https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108295
--- Comment #11 from Jakub Jelinek <jakub at gcc dot gnu.org> --- (In reply to Daniel Lundin from comment #9) > In this case the GNU extension does contradict the ISO 9899:2018 standard. A > conforming compiler is required to issue a diagnostic (as per 5.1.1.3) upon > spotting a violation of the syntax in 6.8.1. In such understanding all extensions would contradict the standard, extensions are when some otherwise invalid source is given a meaning, which is this case too. Even in C++ we often enable features of a newer standard in older ones as long as they don't conflict with valid syntax, just with pedantic warnings/errors. It is possible if the new feature has a new syntax which is invalid in the old standard, so e.g. structured bindings can be accepted in older standards with pedantic warnings/errors just fine because in older standards it was always invalid syntax. Compare that to features where say the behavior of some construct changes with a newer standard version, that one obviously can't be treated that way. And -pedantic/-pedantic-errors are the options to request pedantic warnings or errors.