------- Comment #3 from pinskia at gcc dot gnu dot org 2010-03-05 20:34 ------- Well this is semi on purpose. Though we are should reject the zero sized arrays anyways.
The problem is here we have: struct f { char a[0]; }; Which is common in GNU C/C++ to say f::a is a flexible array member. Also we don't warn about the last array in a struct for that reason. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43270