Hi, This is the 7th version of the patch, which rebased on the latest trunk. This is an important patch needed by Linux Kernel security project.
We already have an extensive discussion on this issue and I have went through 6 revisions of the patches based on the discussion and resolved all the comments and suggestions raised during the discussion; compared to the 6th version, the major change are: 1. update the documentation to replace the mentioning of GCC14 with GCC15. 2. update the documentation to replace the following wording: "A structure or a union with a C99 flexible array member" with: "A structure containing a C99 flexible array member, or a union containing such a structure," All others are the same as 6th version. the 6th version are here: https://gcc.gnu.org/pipermail/gcc-patches/2023-April/616312.html https://gcc.gnu.org/pipermail/gcc-patches/2023-April/616313.html https://gcc.gnu.org/pipermail/gcc-patches/2023-April/616314.html Kees has tested the 6th version of the patch with Linux kernel, and everything is good. relsolved many false positives for bounds checking. Notes for the review history of these patches (2 patches) 1.The patch 1/2: Handle component_ref to a structre/union field including flexible array member [PR101832] The C front-end part has been approved by Joseph. For the middle-end, most of the change has been reviewed by Richard (and modified based on his comments and suggestions), except the change in tree-object-size.cc. 2.The patch 2/2: Update documentation to clarify a GCC extension This is basically a C FE and documentation change, I have updated it based on previous comments and suggestions. Joseph, could you review it to see whether this version is ready to go? bootstrapped and regression tested on aarch64 and x86. Okay for commit? thanks a lot. Qing (for more details on the review history, I listed other important notes below: A. Richard Biener has reviewed the middle-end part of the first patch and raised some comments for the 4th version: https://gcc.gnu.org/pipermail/gcc-patches/2023-March/613643.html I updated it with his suggestion and Sandra’s comments as 5th version: https://gcc.gnu.org/pipermail/gcc-patches/2023-March/614100.html B. The comments for the 5th version: https://gcc.gnu.org/pipermail/gcc-patches/2023-March/614511.html (In this one, Joseph approved the C FE change of the first patch). https://gcc.gnu.org/pipermail/gcc-patches/2023-March/614514.html (In this one, Joseph raised two comments on the documentation wordings for the 2nd patch. And I updated based on his comment in the 6th version) )