Re: [V9][PATCH 2/2] Update documentation to clarify a GCC extension [PR77650]

2023-05-30 Thread Joseph Myers
On Tue, 30 May 2023, Qing Zhao via Gcc-patches wrote: > Joseph, > > could you please review this patch and see whether it's Okay for commit > now? This version is OK. -- Joseph S. Myers jos...@codesourcery.com

[V9][PATCH 2/2] Update documentation to clarify a GCC extension [PR77650]

2023-05-30 Thread Qing Zhao via Gcc-patches
Joseph, could you please review this patch and see whether it's Okay for commit now? thanks a lot for all your comments and suggestions for this patch. Qing. == on a structure with a C99 flexible array member being nested in another structure. "The GCC exte

Re: [V8][PATCH 2/2] Update documentation to clarify a GCC extension [PR77650]

2023-05-30 Thread Qing Zhao via Gcc-patches
> On May 26, 2023, at 4:12 PM, Joseph Myers wrote: > > On Fri, 26 May 2023, Qing Zhao via Gcc-patches wrote: > >> Another question: is it better for me to rearrange the Patch 1/2 and Patch >> 2/2 a little bit, >> to put the FE , doc change and corresponding testing case together into one

Re: [V8][PATCH 2/2] Update documentation to clarify a GCC extension [PR77650]

2023-05-26 Thread Joseph Myers
On Fri, 26 May 2023, Qing Zhao via Gcc-patches wrote: > Another question: is it better for me to rearrange the Patch 1/2 and Patch > 2/2 a little bit, > to put the FE , doc change and corresponding testing case together into one > patch, (you have approved the FE part of change in Patch 1/2).

Re: [V8][PATCH 2/2] Update documentation to clarify a GCC extension [PR77650]

2023-05-26 Thread Qing Zhao via Gcc-patches
Thank you for the suggestion. > On May 26, 2023, at 1:59 PM, Joseph Myers wrote: > > On Thu, 25 May 2023, Qing Zhao via Gcc-patches wrote: > >>> On May 25, 2023, at 4:51 PM, Joseph Myers wrote: >>> >>> The documentation in this case is OK, though claims about how a future >>> version will b

Re: [V8][PATCH 2/2] Update documentation to clarify a GCC extension [PR77650]

2023-05-26 Thread Joseph Myers
On Thu, 25 May 2023, Qing Zhao via Gcc-patches wrote: > > On May 25, 2023, at 4:51 PM, Joseph Myers wrote: > > > > The documentation in this case is OK, though claims about how a future > > version will behave have a poor track record (we tend to end up with such > > claims persisting in the d

Re: [V8][PATCH 2/2] Update documentation to clarify a GCC extension [PR77650]

2023-05-25 Thread Qing Zhao via Gcc-patches
> On May 25, 2023, at 4:51 PM, Joseph Myers wrote: > > The documentation in this case is OK, though claims about how a future > version will behave have a poor track record (we tend to end up with such > claims persisting in the documentation even though the change in question > didn't get

Re: [V8][PATCH 2/2] Update documentation to clarify a GCC extension [PR77650]

2023-05-25 Thread Joseph Myers
The documentation in this case is OK, though claims about how a future version will behave have a poor track record (we tend to end up with such claims persisting in the documentation even though the change in question didn't get made and might sometimes no longer be considered desirable). --

[V8][PATCH 2/2] Update documentation to clarify a GCC extension [PR77650]

2023-05-25 Thread Qing Zhao via Gcc-patches
on a structure with a C99 flexible array member being nested in another structure. "The GCC extension accepts a structure containing an ISO C99 "flexible array member", or a union containing such a structure (possibly recursively) to be a member of a structure. There are two situations: * A

[PATCH 2/2] Update documentation to clarify a GCC extension [PR77650]

2023-05-24 Thread Qing Zhao via Gcc-patches
on a structure with a C99 flexible array member being nested in another structure. "The GCC extension accepts a structure containing an ISO C99 "flexible array member", or a union containing such a structure (possibly recursively) to be a member of a structure. There are two situations: * A

Re: [V7][PATCH 2/2] Update documentation to clarify a GCC extension [PR77650]

2023-05-24 Thread Qing Zhao via Gcc-patches
Hi, Joseph, I modified the gcc/doc/extend.texi per your suggestion as following: Let me know if you have further comment and suggestion on this patch. I will send out the V8 of the patch after some testing. Thanks. Qing. diff --git a/gcc/doc/exten

Re: [V7][PATCH 2/2] Update documentation to clarify a GCC extension [PR77650]

2023-05-24 Thread Qing Zhao via Gcc-patches
Joseph, Thanks a lot for the review. And sorry for my late reply (just came back from a short vacation). > On May 19, 2023, at 5:12 PM, Joseph Myers wrote: > > On Fri, 19 May 2023, Qing Zhao via Gcc-patches wrote: > >> +GCC extension accepts a structure containing an ISO C99 @dfn{flexible arr

Re: [V7][PATCH 2/2] Update documentation to clarify a GCC extension [PR77650]

2023-05-19 Thread Joseph Myers
On Fri, 19 May 2023, Qing Zhao via Gcc-patches wrote: > +GCC extension accepts a structure containing an ISO C99 @dfn{flexible array "The GCC extension" or "A GCC extension". > +@item > +A structure containing a C99 flexible array member, or a union containing > +such a structure, is the middle

[V7][PATCH 2/2] Update documentation to clarify a GCC extension [PR77650]

2023-05-19 Thread Qing Zhao via Gcc-patches
on a structure with a C99 flexible array member being nested in another structure. "GCC extension accepts a structure containing an ISO C99 "flexible array member", or a union containing such a structure (possibly recursively) to be a member of a structure. There are two situations: * A stru

Ping * 3: [V6][PATCH 2/2] Update documentation to clarify a GCC extension

2023-04-20 Thread Qing Zhao via Gcc-patches
Hi, Is this patch ready for GCC14? Thanks. Qing Begin forwarded message: From: Qing Zhao via Gcc-patches mailto:gcc-patches@gcc.gnu.org>> Subject: Fwd: [V6][PATCH 2/2] Update documentation to clarify a GCC extension Date: April 11, 2023 at 9:38:29 AM EDT To: Joseph Myers mail

Fwd: [V6][PATCH 2/2] Update documentation to clarify a GCC extension

2023-04-11 Thread Qing Zhao via Gcc-patches
@gcc.gnu.org>> Subject: Fwd: [V6][PATCH 2/2] Update documentation to clarify a GCC extension Date: April 4, 2023 at 9:07:55 AM EDT To: Joseph Myers mailto:jos...@codesourcery.com>> Cc: Jakub Jelinek mailto:ja...@redhat.com>>, Richard Biener mailto:richard.guent...@gmail.com>>,

Fwd: [V6][PATCH 2/2] Update documentation to clarify a GCC extension

2023-04-04 Thread Qing Zhao via Gcc-patches
Ping…. Qing Begin forwarded message: From: Qing Zhao mailto:qing.z...@oracle.com>> Subject: [PATCH 2/2] Update documentation to clarify a GCC extension Date: March 28, 2023 at 11:49:44 AM EDT To: ja...@redhat.com<mailto:ja...@redhat.com>, jos...@codesourcery.com<mailto:jos...@c

[PATCH 2/2] Update documentation to clarify a GCC extension

2023-03-28 Thread Qing Zhao via Gcc-patches
on a structure with a C99 flexible array member being nested in another structure. (PR77650) "GCC extension accepts a structure containing an ISO C99 "flexible array member", or a union containing such a structure (possibly recursively) to be a member of a structure. There are two situations:

Re: [V5][PATCH 2/2] Update documentation to clarify a GCC extension

2023-03-27 Thread Qing Zhao via Gcc-patches
> On Mar 27, 2023, at 12:48 PM, Qing Zhao via Gcc-patches > wrote: > > > >> On Mar 27, 2023, at 12:31 PM, Jakub Jelinek wrote: >> >> On Mon, Mar 27, 2023 at 04:22:25PM +, Qing Zhao via Gcc-patches wrote: The latter IMHO. Having a warning with completely nonsensical name will

Re: [V5][PATCH 2/2] Update documentation to clarify a GCC extension

2023-03-27 Thread Qing Zhao via Gcc-patches
> On Mar 27, 2023, at 12:31 PM, Jakub Jelinek wrote: > > On Mon, Mar 27, 2023 at 04:22:25PM +, Qing Zhao via Gcc-patches wrote: >>> The latter IMHO. Having a warning with completely nonsensical name will >>> just confuse users. >> >> Okay. -:) >> How about "-Wstruct-with-fam-not-at-end”?

Re: [V5][PATCH 2/2] Update documentation to clarify a GCC extension

2023-03-27 Thread Jakub Jelinek via Gcc-patches
On Mon, Mar 27, 2023 at 04:22:25PM +, Qing Zhao via Gcc-patches wrote: > > The latter IMHO. Having a warning with completely nonsensical name will > > just confuse users. > > Okay. -:) > How about "-Wstruct-with-fam-not-at-end”? Or do you have any suggestion on > the name? Nobody will know

Re: [V5][PATCH 2/2] Update documentation to clarify a GCC extension

2023-03-27 Thread Qing Zhao via Gcc-patches
> On Mar 27, 2023, at 12:06 PM, Jakub Jelinek wrote: > > On Mon, Mar 27, 2023 at 03:57:58PM +, Qing Zhao wrote: +Please use warning option @option{-Wgnu-variable-sized-type-not-at-end} to >>> This is certainly misnamed. >> >> The name “-Wgnu-variable-sized-type-not-at-end” was

Re: [V5][PATCH 2/2] Update documentation to clarify a GCC extension

2023-03-27 Thread Jakub Jelinek via Gcc-patches
On Mon, Mar 27, 2023 at 03:57:58PM +, Qing Zhao wrote: > >> +Please use warning option @option{-Wgnu-variable-sized-type-not-at-end} > >> to > > This is certainly misnamed. > > The name “-Wgnu-variable-sized-type-not-at-end” was just used the warning > name from CLANG. -:) > > Shall we use

Re: [V5][PATCH 2/2] Update documentation to clarify a GCC extension

2023-03-27 Thread Qing Zhao via Gcc-patches
> On Mar 27, 2023, at 11:43 AM, Jakub Jelinek wrote: > > On Mon, Mar 27, 2023 at 01:38:34PM +, Qing Zhao wrote: >> >> >>> On Mar 23, 2023, at 4:14 PM, Joseph Myers wrote: >>> >>> On Thu, 23 Mar 2023, Qing Zhao via Gcc-patches wrote: >>> +Wgnu-variable-sized-type-not-at-end +C

Re: [V5][PATCH 2/2] Update documentation to clarify a GCC extension

2023-03-27 Thread Jakub Jelinek via Gcc-patches
On Mon, Mar 27, 2023 at 01:38:34PM +, Qing Zhao wrote: > > > > On Mar 23, 2023, at 4:14 PM, Joseph Myers wrote: > > > > On Thu, 23 Mar 2023, Qing Zhao via Gcc-patches wrote: > > > >> +Wgnu-variable-sized-type-not-at-end > >> +C C++ Var(warn_variable_sized_type_not_at_end) Warning > >> +War

Re: [V5][PATCH 2/2] Update documentation to clarify a GCC extension

2023-03-27 Thread Qing Zhao via Gcc-patches
> On Mar 27, 2023, at 10:34 AM, Xi Ruoyao wrote: > > On Mon, 2023-03-27 at 13:38 +, Qing Zhao via Gcc-patches wrote: >> >> >>> On Mar 23, 2023, at 4:14 PM, Joseph Myers wrote: >>> >>> On Thu, 23 Mar 2023, Qing Zhao via Gcc-patches wrote: >>> +Wgnu-variable-sized-type-not-at-end >>

Re: [V5][PATCH 2/2] Update documentation to clarify a GCC extension

2023-03-27 Thread Xi Ruoyao via Gcc-patches
On Mon, 2023-03-27 at 13:38 +, Qing Zhao via Gcc-patches wrote: > > > > On Mar 23, 2023, at 4:14 PM, Joseph Myers wrote: > > > > On Thu, 23 Mar 2023, Qing Zhao via Gcc-patches wrote: > > > > > +Wgnu-variable-sized-type-not-at-end > > > +C C++ Var(warn_variable_sized_type_not_at_end) Warnin

Re: [V5][PATCH 2/2] Update documentation to clarify a GCC extension

2023-03-27 Thread Qing Zhao via Gcc-patches
> On Mar 23, 2023, at 4:14 PM, Joseph Myers wrote: > > On Thu, 23 Mar 2023, Qing Zhao via Gcc-patches wrote: > >> +Wgnu-variable-sized-type-not-at-end >> +C C++ Var(warn_variable_sized_type_not_at_end) Warning >> +Warn about structures or unions with C99 flexible array members are not >> +at

Re: Fwd: [V5][PATCH 2/2] Update documentation to clarify a GCC extension

2023-03-23 Thread Joseph Myers
On Thu, 23 Mar 2023, Qing Zhao via Gcc-patches wrote: > +Wgnu-variable-sized-type-not-at-end > +C C++ Var(warn_variable_sized_type_not_at_end) Warning > +Warn about structures or unions with C99 flexible array members are not > +at the end of a structure. I think there's at least one word missing

Fwd: [V5][PATCH 2/2] Update documentation to clarify a GCC extension

2023-03-23 Thread Qing Zhao via Gcc-patches
Ping… Please let me know if you have any further comments on the patch. thanks. Qing Begin forwarded message: From: Qing Zhao mailto:qing.z...@oracle.com>> Subject: [V5][PATCH 2/2] Update documentation to clarify a GCC extension Date: March 16, 2023 at 5:47:15 PM EDT T

[V5][PATCH 2/2] Update documentation to clarify a GCC extension

2023-03-16 Thread Qing Zhao via Gcc-patches
on a structure with a C99 flexible array member being nested in another structure. (PR77650) "GCC extension accepts a structure containing an ISO C99 "flexible array member", or a union containing such a structure (possibly recursively) to be a member of a structure. There are two situations:

Re: [V4][PATCH 2/2] Update documentation to clarify a GCC extension

2023-03-15 Thread Qing Zhao via Gcc-patches
Hi, Sandra, Thanks a lot for your review and comment. Yes, the issue you raised in below was a really tough one that I didn’t feel very comfortable to handle it well… This documentation change is mainly to fix: PR77650 (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77650). The real user case

Re: [V4][PATCH 2/2] Update documentation to clarify a GCC extension

2023-03-14 Thread Sandra Loosemore
On 2/24/23 11:35, Qing Zhao via Gcc-patches wrote: gcc/c-family/ChangeLog: * c.opt: New option -Wgnu-variable-sized-type-not-at-end. gcc/c/ChangeLog: * c-decl.cc (finish_struct): Issue warnings for new option. gcc/ChangeLog: * doc/extend.texi: Document GCC extension

Re: [V4][PATCH 2/2] Update documentation to clarify a GCC extension

2023-03-13 Thread Qing Zhao via Gcc-patches
> On Mar 12, 2023, at 7:14 PM, Sandra Loosemore wrote: > > On 3/2/23 17:03, Qing Zhao via Gcc-patches wrote: >> Ping. > > It looks to me like there is an associated code patch (for PR101832) that is > still under technical discussion? Yes, the 1st patch in this serie is the patch for PR10

Re: [V4][PATCH 2/2] Update documentation to clarify a GCC extension

2023-03-12 Thread Sandra Loosemore
On 3/2/23 17:03, Qing Zhao via Gcc-patches wrote: Ping. It looks to me like there is an associated code patch (for PR101832) that is still under technical discussion? Or is this documentation patch independent of that change? -Sandra

Re: [V4][PATCH 2/2] Update documentation to clarify a GCC extension

2023-03-02 Thread Qing Zhao via Gcc-patches
Ping. Qing > On Feb 24, 2023, at 1:35 PM, Qing Zhao wrote: > > on a structure with a C99 flexible array member being nested in > another structure. > > "GCC extension accepts a structure containing an ISO C99 "flexible array > member", or a union containing such a structure (possibly recursive

[V4][PATCH 2/2] Update documentation to clarify a GCC extension

2023-02-24 Thread Qing Zhao via Gcc-patches
on a structure with a C99 flexible array member being nested in another structure. "GCC extension accepts a structure containing an ISO C99 "flexible array member", or a union containing such a structure (possibly recursively) to be a member of a structure. There are two situations: * The st

Re: [v3][PATCH 2/2] Update documentation to clarify a GCC extension (PR77650)

2023-02-24 Thread Qing Zhao via Gcc-patches
> On Feb 23, 2023, at 7:56 PM, Joseph Myers wrote: > > On Thu, 23 Feb 2023, Qing Zhao via Gcc-patches wrote: > >> But the following: >> >> struct flex1 { int length1; char data1[]; }; >> struct flex2 { int length2; char data2[]; }; >> union union_flex { struct flex1 f1; struct flex2 f2; };

Re: [v3][PATCH 2/2] Update documentation to clarify a GCC extension (PR77650)

2023-02-23 Thread Joseph Myers
On Thu, 23 Feb 2023, Qing Zhao via Gcc-patches wrote: > But the following: > > struct flex1 { int length1; char data1[]; }; > struct flex2 { int length2; char data2[]; }; > union union_flex { struct flex1 f1; struct flex2 f2; }; /* this is C > standard. */ > > struct out_flex { int n; union

Re: [v3][PATCH 2/2] Update documentation to clarify a GCC extension (PR77650)

2023-02-23 Thread Qing Zhao via Gcc-patches
> On Feb 23, 2023, at 5:04 PM, Qing Zhao via Gcc-patches > wrote: > > > >> On Feb 23, 2023, at 4:24 PM, Joseph Myers wrote: >> >> On Thu, 23 Feb 2023, Qing Zhao via Gcc-patches wrote: >> >>> +@item >>> +The structure with a C99 flexible array member is the field of >>> +another union, for

Re: [v3][PATCH 2/2] Update documentation to clarify a GCC extension (PR77650)

2023-02-23 Thread Qing Zhao via Gcc-patches
> On Feb 23, 2023, at 4:24 PM, Joseph Myers wrote: > > On Thu, 23 Feb 2023, Qing Zhao via Gcc-patches wrote: > >> +@item >> +The structure with a C99 flexible array member is the field of >> +another union, for example: >> + >> +@smallexample >> +struct flex1 @{ int length1; char data1[]; @}

Re: Fwd: [v3][PATCH 2/2] Update documentation to clarify a GCC extension (PR77650)

2023-02-23 Thread Joseph Myers
On Thu, 23 Feb 2023, Qing Zhao via Gcc-patches wrote: > +@item > +The structure with a C99 flexible array member is the field of > +another union, for example: > + > +@smallexample > +struct flex1 @{ int length1; char data1[]; @} > +struct flex2 @{ int length2; char data2[]; @} > + > +union out_

Fwd: [v3][PATCH 2/2] Update documentation to clarify a GCC extension (PR77650)

2023-02-23 Thread Qing Zhao via Gcc-patches
Ping * 2. Hi, Joseph and Richard, Could you please review this patch and let me know whether it’s ready for committing into GCC13? thanks. Qing Begin forwarded message: From: Qing Zhao mailto:qing.z...@oracle.com>> Subject: [v3][PATCH 2/2] Update documentation to clarify a GCC ext

Re: [v3][PATCH 2/2] Update documentation to clarify a GCC extension (PR77650)

2023-02-17 Thread Qing Zhao via Gcc-patches
Ping… Qing > On Feb 10, 2023, at 7:50 PM, Qing Zhao wrote: > > on structure with C99 flexible array member being nested in another structure. > > This is also fixed PR77650. > > " GCC extension accepts a structure containing a ISO C99 "flexible array > member", or a union containing such a st

[v3][PATCH 2/2] Update documentation to clarify a GCC extension (PR77650)

2023-02-10 Thread Qing Zhao via Gcc-patches
on structure with C99 flexible array member being nested in another structure. This is also fixed PR77650. " GCC extension accepts a structure containing a ISO C99 "flexible array member", or a union containing such a structure (possibly recursively) to be a member of a structure. There are thr