* [GCC13][Patch][V3][0/2]Add a new option -fstrict-flex-array[=n] and attribute strict_flex_array(n) and use it in PR101836
@ 2022-08-17 14:40 Qing Zhao
0 siblings, 0 replies; only message in thread
From: Qing Zhao @ 2022-08-17 14:40 UTC (permalink / raw)
To: GCC Patches
Cc: richard Biener, jakub Jelinek, martin Sebor, kees Cook, joseph
Hi,
This is the 3rd version of the patch set.
Compare to the 2nd version, the following are the major change:
1. change the name of the option from -fstrict-flex-array to -fstrict-flex-arrays (per Kees' suggestion, this will be consistent with LLVM's option);
2. -std=c89 and ISO C++ will disable all -fstrict-flex-arrays;
-std=gnu89 and C++ with GNU extension will disable -fstrict-flex-arrays=3
the attribute has the same impact.
Issue warnings when the feature is disabled;
3. add testing cases for these new changes;
4. update documentation;
5. delete the common untility routine flexible_array_member_p, zero_length_array_p, one_element_array_p from tree.[ch], and move them to c/c-decl.cc since they are C/C++ specific concepts, should not be exposed in middle end.
6. not update component_ref_size routine in tree.cc, keep the original one;
7. handle the new IR bit in LTO streamer in/out per Richard's request;
8. handle the new IR bit in C++ modules per Richard's request with Nathan's help;
9. Print the new IR bit;
10. update array_at_struct_end_p to check the new IR bit DECL_NOT_FLEXARRAY to still keep array_at_struct_end_p as the common utility in middle-end;
I have bootstrapped and regression tested on both aarch64 and x86, no issues.
Let me know if you have any comments on the patches.
thanks.
Qing
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-08-17 14:40 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-17 14:40 [GCC13][Patch][V3][0/2]Add a new option -fstrict-flex-array[=n] and attribute strict_flex_array(n) and use it in PR101836 Qing Zhao
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).