https://gcc.gnu.org/bugzilla/show_bug.cgi?id=123944
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jakub at gcc dot gnu.org
--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Note, the standard requires diagnostics, a warning is diagnostic too. And you
need -pedantic/-Wpedantic to get all the required diagnostics or
-pedantic-errors to get them as errors.
https://gcc.gnu.org/onlinedocs/gcc-15.2.0/gcc/Warnings-and-Errors.html
GCC always tries to compile your program if possible; it never gratuitously
rejects a program whose meaning is clear merely because (for instance) it fails
to conform to a standard. In some cases, however, the C and C++ standards
specify that certain extensions are forbidden, and a diagnostic must be issued
by a conforming compiler. The -pedantic option tells GCC to issue warnings in
such cases; -pedantic-errors says to make them errors instead. This does not
mean that all non-ISO constructs get warnings or errors.