Hi, Nathan, I am adding a new bitfield “decl_not_flexarray” in “tree_decl_common” (gcc/tree-core.h) for the new gcc feature -fstrict-flex-arrays.
==== diff --git a/gcc/tree-core.h b/gcc/tree-core.h index ea9f281f1cc..458c6e6ceea 100644 --- a/gcc/tree-core.h +++ b/gcc/tree-core.h @@ -1813,7 +1813,10 @@ struct GTY(()) tree_decl_common { TYPE_WARN_IF_NOT_ALIGN. */ unsigned int warn_if_not_align : 6; - /* 14 bits unused. */ + /* In FIELD_DECL, this is DECL_NOT_FLEXARRAY. */ + unsigned int decl_not_flexarray : 1; + + /* 13 bits unused. */ /* UID for points-to sets, stable over copying from inlining. */ unsigned int pt_uid; ==== (Please refer to the following for details: https://gcc.gnu.org/pipermail/gcc-patches/2022-July/598556.html https://gcc.gnu.org/pipermail/gcc-patches/2022-July/598965.html ) Richard mentioned the following: "I've not seen it so you are probably missing it - the bit has to be streamed in tree-streamer-{in,out}.cc to be usable from LTO. Possibly C++ module streaming also needs to handle it.” I have figured out that where to add the handling of the bit in “tree-streamer-{in, out}.cc, However, it’s quite difficult for me to locate where should I add the handling of this new bit in C++ module streaming, could you please help me on this? Thanks a lot for your help. Qing