> On Feb 8, 2023, at 2:20 PM, Siddhesh Poyarekar <siddh...@gotplt.org> wrote: > > On 2023-02-08 14:09, Joseph Myers wrote: >> What must be avoided is -pedantic diagnostics for >> struct flex1 { int n; int data[1]; }; >> struct out_flex_end1 { int m; struct flex1 flex_data; }; >> regardless of whether considered flexible or not, since that's clearly >> valid in standard C. > > Are you sure about "regardless of whether considered flexible or not", since > ISTM the validity of the above in standard C is limited to when it's > considered a non-flexible array. So with -pedantic it shouldn't warn, but it > also then shouldn't consider it a flexible array. > > In other words, perhaps it makes sense to imply -fstrict-flex-arrays with > -pedantic? I think -pedantic might imply -fstrict-flex-arrays=3, but not -fstrict-flex-arrays=n when n < 3. Right? Qing > > Sid
- Re: [PATCH 1/2] Handl... Qing Zhao via Gcc-patches
- Re: [PATCH 1/2] Handl... Joseph Myers
- Re: [PATCH 1/2] Handl... Qing Zhao via Gcc-patches
- Re: [PATCH 1/2] Handl... Joseph Myers
- Re: [PATCH 1/2] Handl... Qing Zhao via Gcc-patches
- Re: [PATCH 1/2] Handl... Joseph Myers
- Re: [PATCH 1/2] Handl... Qing Zhao via Gcc-patches
- Re: [PATCH 1/2] Handl... Joseph Myers
- Re: [PATCH 1/2] Handl... Siddhesh Poyarekar
- Re: [PATCH 1/2] Handl... Joseph Myers
- Re: [PATCH 1/2] Handl... Qing Zhao via Gcc-patches
- Re: [PATCH 1/2] Handl... Qing Zhao via Gcc-patches
- Re: [PATCH 1/2] Handl... Qing Zhao via Gcc-patches
- Re: [PATCH 1/2] Handl... Kees Cook via Gcc-patches
- Re: [PATCH 1/2] Handl... Qing Zhao via Gcc-patches
- Re: [PATCH 1/2] Handl... Richard Biener via Gcc-patches
- Re: [PATCH 1/2] Handl... Qing Zhao via Gcc-patches
- Re: [PATCH 1/2] Handl... Siddhesh Poyarekar
- Re: [PATCH 1/2] Handl... Qing Zhao via Gcc-patches
- Re: [PATCH 1/2] Handle component_ref to a s... Siddhesh Poyarekar
- Re: [PATCH 1/2] Handle component_ref t... Qing Zhao via Gcc-patches