[Bug c/58235] New: Missing diagnostic on assignment to array in c89

2013-08-23 Thread olivier.gay at a3 dot epfl.ch
Assignee: unassigned at gcc dot gnu.org Reporter: olivier.gay at a3 dot epfl.ch struct bla { int x[1]; } s = {{0}}; struct bla foo(void) { return s; } void bar(void) { int c[1]; c = foo().x; } gcc in c89 mode (-std=c89 -Wall -pedantic) does not issue

[Bug c/58235] Missing diagnostic on assignment to array in c89

2013-08-23 Thread olivier.gay at a3 dot epfl.ch
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58235 --- Comment #2 from Olivier Gay olivier.gay at a3 dot epfl.ch --- Still, constraint of assignment (c90, 6.3.16) requires the left operand of assignment to be a modifiable lvalue. But c object array is not a modifiable lvalue as arrays