Message ID | 20230124221123.299474-1-jason@redhat.com |
---|---|
State | New |
Headers | show |
Series | [pushed] c++: "" #pragma at BOF [PR108504] | expand |
diff --git a/gcc/cp/parser.cc b/gcc/cp/parser.cc index b38c22e9a3d..07ec0e14491 100644 --- a/gcc/cp/parser.cc +++ b/gcc/cp/parser.cc @@ -705,7 +705,7 @@ cp_lexer_new_main (void) /* It's possible that parsing the first pragma will load a PCH file, which is a GC collection point. So we have to do that before allocating any memory. */ - cp_lexer_get_preprocessor_token (0, &token); + cp_lexer_get_preprocessor_token (C_LEX_STRING_NO_JOIN, &token); cp_parser_initial_pragma (&token); c_common_no_more_pch (); diff --git a/gcc/testsuite/g++.dg/ext/pragma1.C b/gcc/testsuite/g++.dg/ext/pragma1.C new file mode 100644 index 00000000000..bb258dac9a7 --- /dev/null +++ b/gcc/testsuite/g++.dg/ext/pragma1.C @@ -0,0 +1,4 @@ +// PR c++/108504 + +"1" // { dg-error "" } +#pragma GCC diagnostic push