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 <jos...@codesourcery.com> wrote: > > 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". Okay. > >> +@item >> +A structure containing a C99 flexible array member, or a union containing >> +such a structure, is the middle field of another structure, for example: > > There might be more than one middle field, and I think this case also > includes where it's the *first* field - any field other than the last. Good point. Will fix this. > >> +@smallexample >> +struct flex @{ int length; char data[]; @}; >> + >> +struct mid_flex @{ int m; struct flex flex_data; int n; @}; >> +@end smallexample >> + >> +In the above, @code{mid_flex.flex_data.data[]} has undefined behavior. > > And it's not literally mid_flex.flex_data.data[] that has undefined > behavior, but trying to access a member of that array. Yes, you are right. Will fix this. > >> +Compilers do not handle such case consistently, Any code relying on > > "such a case", and "," should be "." at the end of a sentence. Okay, will fix this. Thanks Qing > > -- > Joseph S. Myers > jos...@codesourcery.com