https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100124

Martin Sebor <msebor at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Blocks|                            |69698

--- Comment #5 from Martin Sebor <msebor at gcc dot gnu.org> ---
G++ accepted structs where a flexible array is the sole member until version 6.
 G++ 6 tightened up the rules (in r231665) to more closely match the C front
end.  I suspect Clang implemented the more permissive historical G++ behavior
in C++ mode for compatibility with G++ and the stricter GCC behavior in C mode,
and to this day hasn't changed.  My impression is that the historical G++
permissiveness was due to oversights rather than deliberate features (we're
tracking a few such outstanding issues in pr69698 that are yet to be fixed).


Referenced Bugs:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69698
[Bug 69698] [meta-bug] flexible array members

Reply via email to