[Bug tree-optimization/107952] tree-object-size: inconsistent size for flexible arrays nested in structs
qinzhao at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Thu Jan 26 22:13:10 GMT 2023
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107952
--- Comment #19 from qinzhao at gcc dot gnu.org ---
(In reply to rguenther@suse.de from comment #11)
> > Agreed, usually where these extension should be documented?
>
> They are usually documented in doc/extend.texi
there is one section on "Zero Length" (Arrays of Length Zero), which mentioned
this a little bit:
"A structure containing a flexible array member, or a union containing
such a structure (possibly recursively), may not be a member of a
structure or an element of an array. (However, these uses are
permitted by GCC as extensions.)"
We might add one more sub-section inside this section to clarify how GCC
handles the situation when a structure containing a flexible array member
becomes a member of another structure.
is that a good place to put the documentation?
More information about the Gcc-bugs
mailing list