[cfe-dev] Semantics for dereferencing incomplete types?
Neil Booth
neil at daikokuya.co.uk
Sat Jan 12 23:45:29 PST 2008
Eli Friedman wrote:-
> Here is another test:
> void foo3 (void)
> {
> void* x = 0;
> void* y = &*x;
> }
Correct behaviour there depends on dialect:
neil at duron:~/src/c$ ~/src/cfe/cfe /tmp/bug.c --c90
"/tmp/bug.c", line 4: error: expression must be an lvalue or a function
void* y = &*x;
^
"/tmp/bug.c", line 4: warning: variable "y" declared but not used
void* y = &*x;
^
1 error found compiling "/tmp/bug.c".
neil at duron:~/src/c$ ~/src/cfe/cfe /tmp/bug.c --c99
"/tmp/bug.c", line 4: warning: variable "y" declared but not used
void* y = &*x;
^
Neil.
More information about the cfe-dev
mailing list