------- Comment #5 from pinskia at gcc dot gnu dot org 2010-03-05 22:22 ------- Well: struct f { int t[0]; };
is invalid c/C++ :). But we accept it as an extension. Anyways the thing when you do: f *t = ..; t->t[1] = 1; We don't warn there on purpose as f::t might used as flexible array. We do the same thing for any array that ends the struct, it does not matter. This is very common in C and C++ code so turning this warning on for this one false negative case is going to be hard not to get that many false positive warnings. Sorry. -- pinskia at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution| |WONTFIX http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43270