https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111659
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|FIXED |---
Status|RESOLVED |REOPENED
--- Comment #6 from Jonathan Wakely <redi at gcc dot gnu.org> ---
This rewrite seems to have garbled the docs.
The attribute says:
@var{level}=0 is the least strict level, all trailing arrays of structures
are treated as flexible array members. @var{level}=3 is the strictest level,
only when the trailing array is declared as a flexible array member per C99
standard onwards (@samp{[]}), it is treated as a flexible array member.
The -fstrict-flex-arrays option used to agree, but now it says:
@option{-fstrict-flex-arrays=3}, which is the strictest; all
trailing arrays of structures are treated as flexible array members.
The negative form @option{-fno-strict-flex-arrays} is equivalent to
@option{-fstrict-flex-arrays=0}, which is the least strict. In this
case a trailing array is treated as a flexible array member only when
it is declared as a flexible array member per C99 standard onwards.
So they disagree on what "strictest" means. This is very confusing now.