https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78657
--- Comment #2 from Joseph Quinsey <jquinsey at entrenet dot com> --- The code int foo = #pragma GCC diagnostic push 42; gives exactly the same error messages. So this report is not about _Pragma per se, but about #pragma. But I cannot see where or if the standard addresses this. N1570 section 5.1.1.2, Translation phases, item 4 seems to say "All preprocessing directives are then deleted". Other preprocessor directives on the second line, such as int foo = #define BAR bar 42; are perfectly fine in gcc/g++ (including #include).