https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108295
Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|WAITING |RESOLVED Resolution|--- |INVALID --- Comment #6 from Andrew Pinski <pinskia at gcc dot gnu.org> --- (In reply to Daniel Lundin from comment #5) > (In reply to Andrew Pinski from comment #4) > > Try -pedantic-errors. > > Yes I already did and then the error appears. But that would imply that this > is a non-standard GNU extension and not an upcoming standard C23 feature, > which still doesn't seem correct. > > If the intention was to add this as a GNU extension until formal release of > C23, then the use of such GNU extensions will behave inconsistently between > gcc <10.4 and gcc >11.0 when using the same compiler options. And I don't > think that's documented anywhere either. https://gcc.gnu.org/onlinedocs/gcc-12.2.0/gcc/Mixed-Labels-and-Declarations.html#Mixed-Labels-and-Declarations Compared to https://gcc.gnu.org/onlinedocs/gcc-9.5.0/gcc/Mixed-Declarations.html#Mixed-Declarations Is definitely documented.