[Bug c/90962] Array bound over optimization

jakub at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Mon Jun 24 08:14:00 GMT 2019


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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
                 CC|                            |jakub at gcc dot gnu.org
         Resolution|---                         |INVALID

--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
While GCC treats trailing arrays in structures in many cases as poor man's
flexible array members (extension against the standard), your case is already
over what GCC is willing to accept as an extension, as tab[1] trailing array is
nested in a union which is nested in another array.
Don't do this, the code is invalid both from the standard point of view and
even including the extensions GCC supports on top of that.


More information about the Gcc-bugs mailing list