[Bug c++/69550] Need a way to disable "flexible array member in an otherwise empty struct" error on GCC 6
redi at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Fri Jan 29 11:05:00 GMT 2016
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69550
--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> ---
The code is nonsense, what's it even supposed to do?
It would be invalid in C (where flexible arrays are actually standard) because
flexible arrays can only be the last member, *and* because apart from the
flexible arrays it's an otherwise empty struct. It's useless, and only compiled
by accident.
Allowing it with -fpermissive might make sense though, as that flag allows all
kinds of terrible rubbish to compile.
More information about the Gcc-bugs
mailing list