https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71003
Manuel López-Ibáñez <manu at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |manu at gcc dot gnu.org See Also| |https://gcc.gnu.org/bugzill | |a/show_bug.cgi?id=53431 --- Comment #3 from Manuel López-Ibáñez <manu at gcc dot gnu.org> --- 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'm surprised there is no older report about this.