https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98484
Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Last reconfirmed| |2021-09-26 Ever confirmed|0 |1 --- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> --- Confirmed. -Wsystem-headers enables all of the warnings ... What is interesting is in GCC 10, we don't even get the warning for g0 without -Wsystem-headers. In GCC 9 -Wsystem-headers does not enable the warning for g1 or g2 either.