On Wed, 31 Aug 2022, Qing Zhao wrote:

> Does the above mean that -std=gnu89 does not support C99 flexible array 
> member, then

No.

Flexible array members are supported by GCC in all C standards modes.  The 
C90 standard doesn't support them, but that's irrelevant to what GCC 
supports; it just means a diagnostic is required for strict conformance in 
pre-C99 modes.

> When -std=gnu89 + -fstrict-flex-array=3 (ONLY C99 flexible array member 
> [] is treated as a valid flexible array) present together,

That seems reasonable enough without a warning.  If people want a warning 
for flexible array members in older language modes, they can use 
-pedantic; I don't think we need to warn for any particular 
-fstrict-flex-array modes there.

-- 
Joseph S. Myers
jos...@codesourcery.com

Reply via email to