Opened 6 years ago
#177 new defect
typeof not being handled correctly by resolver
| Reported by: | pabuhr | Owned by: | |
|---|---|---|---|
| Priority: | minor | Component: | cfa-cc |
| Version: | 1.0 | Keywords: | |
| Cc: |
Description
The following program compiles in C but fails to compile in Cforall. The resolver is not handling typeof correctly with respect to 0.
int main() {
int i;
int *ip = &i;
typeof(*ip) x = 0;
}
cfa test2.cfa CFA Version 1.0.0 (debug) error: No reasonable alternatives for expression Untyped Init Expression constant expression (0 0: zero_t) InitAlternative: reference to signed int
If the 0 is changed to 2 for the assignment, the error changes to
cfa test2.cfa CFA Version 1.0.0 (debug) test2.cfa:4:1 warning: rvalue to reference conversion of rvalue: constant expression (2 2: signed int)
Note:
See TracTickets
for help on using tickets.