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

2022-12-16 Thread Qing Zhao via Gcc-patches
FYI. Committed this last patch as: https://jira.oci.oraclecorp.com/browse/OLDIS-21095 I will come up with the update to gcc-13/changes.html for -fstrict-flex-arrays very soon. Thanks. Qing > On Dec 16, 2022, at 9:49 AM, Qing Zhao via Gcc-patches > wrote: > > > >> On Dec 16, 2022, at 4:17

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

2022-12-16 Thread Qing Zhao via Gcc-patches
> On Dec 16, 2022, at 4:17 AM, Richard Biener wrote: > > On Thu, 15 Dec 2022, Qing Zhao wrote: > >> >> >>> On Dec 15, 2022, at 2:47 AM, Richard Biener wrote: >>> >>> On Wed, 14 Dec 2022, Qing Zhao wrote: >>> Hi, Richard, I guess that we now agreed on the following:

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

2022-12-16 Thread Richard Biener via Gcc-patches
On Thu, 15 Dec 2022, Qing Zhao wrote: > > > > On Dec 15, 2022, at 2:47 AM, Richard Biener wrote: > > > > On Wed, 14 Dec 2022, Qing Zhao wrote: > > > >> Hi, Richard, > >> > >> I guess that we now agreed on the following: > >> > >> “ the information that we ran into a trailing array but

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

2022-12-15 Thread Qing Zhao via Gcc-patches
> On Dec 15, 2022, at 2:47 AM, Richard Biener wrote: > > On Wed, 14 Dec 2022, Qing Zhao wrote: > >> Hi, Richard, >> >> I guess that we now agreed on the following: >> >> “ the information that we ran into a trailing array but didn't consider >> it a flex array because of

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

2022-12-14 Thread Richard Biener via Gcc-patches
On Wed, 14 Dec 2022, Qing Zhao wrote: > Hi, Richard, > > I guess that we now agreed on the following: > > “ the information that we ran into a trailing array but didn't consider > it a flex array because of -fstrict-flex-arrays is always a useful > information” > > The only thing we didn’t

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

2022-12-14 Thread Qing Zhao via Gcc-patches
Hi, Richard, I guess that we now agreed on the following: “ the information that we ran into a trailing array but didn't consider it a flex array because of -fstrict-flex-arrays is always a useful information” The only thing we didn’t decide is: A. Amend such new information to -Warray-bounds

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

2022-12-14 Thread Qing Zhao via Gcc-patches
> On Dec 14, 2022, at 9:08 AM, Qing Zhao via Gcc-patches > wrote: > > > >> On Dec 14, 2022, at 4:03 AM, Richard Biener wrote: >> >> On Tue, 13 Dec 2022, Qing Zhao wrote: >> >>> Richard, >>> >>> Do you have any decision on this one? >>> Do we need this warning option For GCC? >> >>

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

2022-12-14 Thread Qing Zhao via Gcc-patches
> On Dec 14, 2022, at 4:03 AM, Richard Biener wrote: > > On Tue, 13 Dec 2022, Qing Zhao wrote: > >> Richard, >> >> Do you have any decision on this one? >> Do we need this warning option For GCC? > > Looking at the testcases it seems that the diagnostic amends > -Warray-bounds

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

2022-12-14 Thread Richard Biener via Gcc-patches
On Tue, 13 Dec 2022, Qing Zhao wrote: > Richard, > > Do you have any decision on this one? > Do we need this warning option For GCC? Looking at the testcases it seems that the diagnostic amends -Warray-bounds diagnostics for trailing but not flexible arrays? Wouldn't it be better to

Ping---[V3][PATCH 2/2] Add a new warning option -Wstrict-flex-arrays.

2022-12-13 Thread Qing Zhao via Gcc-patches
Richard, Do you have any decision on this one? Do we need this warning option For GCC? thanks. Qing > On Dec 6, 2022, at 11:18 AM, Qing Zhao wrote: > > '-Wstrict-flex-arrays' > Warn about inproper usages of flexible array members according to > the LEVEL of the 'strict_flex_array

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

2022-12-06 Thread Qing Zhao via Gcc-patches
'-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 according to the LEVEL of the option

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

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,

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

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 > >>

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. >> >>

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

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,

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

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

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

2022-11-08 Thread Qing Zhao via Gcc-patches
'-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 according to the LEVEL of the option