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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |msebor at gcc dot gnu.org

--- Comment #3 from Martin Sebor <msebor at gcc dot gnu.org> ---
The reason why G++ rejects structs with a flexible array as the sole member is
because GCC (in C mode) doesn't accept them.  Git log indicates that GCC
started rejecting such code in r38705, which was committed as part of array
member initialization cleanup.  I don't know why the author of the change chose
to reject such structs rather than accepting them with a warning, just like
empty structs are accepted.  If he had, C++ might have followed suit.  At this
point, I don't see GCC (in either mode) making a change unless C itself were to
change first.  That seems highly unlikely to me (the last proposal to relax the
rules for flexible array members didn't go anywhere).

Reply via email to