[Bug tree-optimization/107952] tree-object-size: inconsistent size for flexible arrays nested in structs

siddhesh at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Mon Dec 5 12:46:01 GMT 2022


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

--- Comment #2 from Siddhesh Poyarekar <siddhesh at gcc dot gnu.org> ---
The standard does not allow the nesting, but gcc supports it as an extension.

The middle end does see the array as a flex array correctly, but
tree-object-size doesn't seem to do the right thing consistently enough.  Or
rather, the current behaviour seems a bit mixed up, which is why I want to try
and specify the behaviour for tree-object-size more clearly with all
combinations of -fstrict-flex-array and arrays, i.e. nested or otherwise.


More information about the Gcc-bugs mailing list