Hi, This is the 4th version for Allow flexible array members in unions and alone in structures [PR53548]
(for your reference, the 1st version is at: https://gcc.gnu.org/pipermail/gcc-patches/2024-April/649737.html The 2nd version is at: https://gcc.gnu.org/pipermail/gcc-patches/2024-April/650019.html The 3rd version is at: https://gcc.gnu.org/pipermail/gcc-patches/2024-April/650255.html) compared to the 3rd version, the major difference are: A. Two minor wording changes in doc/extend.texi per Jason's comments. B. In the 4th patch, for both C and C++ FE, delete the new variable "is_decl_type_union". Review needed: C++ FE changes (in Patch 2 and Patch 4); Middle-end changes (in Patch 2); New C FE change (in Patch 4); New testing cases for _bos (in Patch 4); Approval status: All other changes (C FE and documentation and related testing cases) have been approved with minor updates. The patch set includes: 1. Documentation change. Allow flexible array members in unions and alone in structures [PR53548] 2. C and C++ FE changes to support flexible array members in unions and alone in structures. Adjust testcases for flexible array member in union and alone in structure extension. 3. Add testing cases for flexible array members in unions and alone in structures. 4. Update the C FE routine "add_flexible_array_elts_to_size" C++ FE routine "layout_var_decl" to handle the cases when the DECL is union. Add testing cvases to test the _bos for FAM in union and alone in structures. bootstrapped and regression tested on both x86 and aarch64, no issue. Okay for GCC15? thanks. Qing