https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71003
--- Comment #5 from Eric Gallager <egallager at gcc dot gnu.org> --- (In reply to Manuel López-Ibáñez from comment #3) > I'm pretty sure that this applies to all pedantic warnings that occur while > preprocessing: > > const int a0 = 0b101010; > const int a1 = __extension__ 0b101010; > > C++ lexes everything at once without parsing __extension__. > > Same problem with pragma diagnostics (bug 53431). > > Either these warnings are moved from the preprocessor to the FE, that is, > somehow delayed, or the preprocessor has to learn about __extension__ and > pragma diagnostics. I think the second option would make more sense