gnu /
gcc /
722aa418df94d85eecb7500ec9c38384c557338d C: Flex array in union followed by a structure field is not reported [PR120354]
There is only one last_field for a structure type, but there might
be multiple last_fields for a union type, therefore we should ORed
the result of TYPE_INCLUDES_FLEXARRAY for multiple last_fields of
a union type.
PR c/120354
gcc/c/ChangeLog:
* c-decl.cc (finish_struct): Or the results for TYPE_INCLUDES_FLEXARRAY.
gcc/testsuite/ChangeLog:
* gcc.dg/pr120354.c: New test.
(cherry picked from commit 70418e6c0120cfce33ab69628602dfdadbed683a)
2 files changed