http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42121
Jonathan Wakely <redi at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Last reconfirmed| |2010.10.27 21:31:30 Ever Confirmed|0 |1 --- Comment #8 from Jonathan Wakely <redi at gcc dot gnu.org> 2010-10-27 21:31:30 UTC --- The C++ front end is far too permissive, the comments below show what should change for compatibility with the C front end: struct bogus { int a; char b[]; // should be rejected, b[0] is ok int c; }; struct bogus2 { int x[]; // should be rejected, x[0] is ok }; struct ok { int a; int x[]; }; struct gnu_extension { struct ok a; }; If bogus::b and bogus2::x are declared as zero-length arrays, rather than flexible array members, then they are accepted by the C front end.