Re: [PATCH 2/2] Add a new warning option -Wstrict-flex-arrays.

2022-11-23 Thread Richard Biener via Gcc-patches
On Tue, 22 Nov 2022, Kees Cook wrote: > On Tue, Nov 22, 2022 at 03:02:04PM +, Qing Zhao wrote: > > > > > > > On Nov 22, 2022, at 9:10 AM, Qing Zhao via Gcc-patches > > > wrote: > > > > > > > > > > > >> On Nov 22, 2022, at 3:16 AM, Richard Biener wrote: > > >> > > >> On Mon, 21 Nov 202

Re: [PATCH 2/2] Add a new warning option -Wstrict-flex-arrays.

2022-11-22 Thread Kees Cook via Gcc-patches
On Tue, Nov 22, 2022 at 03:02:04PM +, Qing Zhao wrote: > > > > On Nov 22, 2022, at 9:10 AM, Qing Zhao via Gcc-patches > > wrote: > > > > > > > >> On Nov 22, 2022, at 3:16 AM, Richard Biener wrote: > >> > >> On Mon, 21 Nov 2022, Qing Zhao wrote: > >> > >>> > >>> > On Nov 18, 202

Re: [PATCH 2/2] Add a new warning option -Wstrict-flex-arrays.

2022-11-22 Thread Qing Zhao via Gcc-patches
> On Nov 22, 2022, at 9:10 AM, Qing Zhao via Gcc-patches > wrote: > > > >> On Nov 22, 2022, at 3:16 AM, Richard Biener wrote: >> >> On Mon, 21 Nov 2022, Qing Zhao wrote: >> >>> >>> On Nov 18, 2022, at 11:31 AM, Kees Cook wrote: On Fri, Nov 18, 2022 at 03:19:07PM +,

Re: [PATCH 2/2] Add a new warning option -Wstrict-flex-arrays.

2022-11-22 Thread Qing Zhao via Gcc-patches
> On Nov 22, 2022, at 3:16 AM, Richard Biener wrote: > > On Mon, 21 Nov 2022, Qing Zhao wrote: > >> >> >>> On Nov 18, 2022, at 11:31 AM, Kees Cook wrote: >>> >>> On Fri, Nov 18, 2022 at 03:19:07PM +, Qing Zhao wrote: Hi, Richard, Honestly, it?s very hard for me to deci

Re: [PATCH 2/2] Add a new warning option -Wstrict-flex-arrays.

2022-11-22 Thread Richard Biener via Gcc-patches
On Mon, 21 Nov 2022, Qing Zhao wrote: > > > > On Nov 18, 2022, at 11:31 AM, Kees Cook wrote: > > > > On Fri, Nov 18, 2022 at 03:19:07PM +, Qing Zhao wrote: > >> Hi, Richard, > >> > >> Honestly, it?s very hard for me to decide what?s the best way to handle > >> the interaction > >> betwe

Re: [PATCH 2/2] Add a new warning option -Wstrict-flex-arrays.

2022-11-21 Thread Qing Zhao via Gcc-patches
> On Nov 18, 2022, at 11:31 AM, Kees Cook wrote: > > On Fri, Nov 18, 2022 at 03:19:07PM +, Qing Zhao wrote: >> Hi, Richard, >> >> Honestly, it’s very hard for me to decide what’s the best way to handle the >> interaction >> between -fstrict-flex-array=M and -Warray-bounds=N. >> >> Idea

Re: [PATCH 2/2] Add a new warning option -Wstrict-flex-arrays.

2022-11-18 Thread Kees Cook via Gcc-patches
On Fri, Nov 18, 2022 at 03:19:07PM +, Qing Zhao wrote: > Hi, Richard, > > Honestly, it’s very hard for me to decide what’s the best way to handle the > interaction > between -fstrict-flex-array=M and -Warray-bounds=N. > > Ideally, -fstrict-flex-array=M should completely control the behavi

Re: [PATCH 2/2] Add a new warning option -Wstrict-flex-arrays.

2022-11-18 Thread Qing Zhao via Gcc-patches
Hi, Richard, Honestly, it’s very hard for me to decide what’s the best way to handle the interaction between -fstrict-flex-array=M and -Warray-bounds=N. Ideally, -fstrict-flex-array=M should completely control the behavior of -Warray-bounds. If possible, I prefer this solution. However, -Wa

Re: [PATCH 2/2] Add a new warning option -Wstrict-flex-arrays.

2022-11-18 Thread Richard Biener via Gcc-patches
On Tue, 8 Nov 2022, Qing Zhao wrote: > '-Wstrict-flex-arrays' > Warn about inproper usages of flexible array members according to > the LEVEL of the 'strict_flex_array (LEVEL)' attribute attached to > the trailing array field of a structure if it's available, > otherwise accord

Re: [PATCH 2/2] Add a new warning option -Wstrict-flex-arrays.

2022-11-15 Thread Qing Zhao via Gcc-patches
Ping on this patch. thanks. Qing > On Nov 8, 2022, at 9:51 AM, Qing Zhao wrote: > > '-Wstrict-flex-arrays' > Warn about inproper usages of flexible array members according to > the LEVEL of the 'strict_flex_array (LEVEL)' attribute attached to > the trailing array field of a struct