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

--- Comment #5 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-15 branch has been updated by Qing Zhao <qinz...@gcc.gnu.org>:

https://gcc.gnu.org/g:722aa418df94d85eecb7500ec9c38384c557338d

commit r15-10159-g722aa418df94d85eecb7500ec9c38384c557338d
Author: Qing Zhao <qing.z...@oracle.com>
Date:   Wed Jul 30 14:49:12 2025 +0000

    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)
  • [Bug c/120354] Flexible array u... cvs-commit at gcc dot gnu.org via Gcc-bugs

Reply via email to