diff options
author | Jason Merrill <jason@redhat.com> | 2023-01-24 16:26:50 -0500 |
---|---|---|
committer | Jason Merrill <jason@redhat.com> | 2023-01-24 17:11:52 -0500 |
commit | 327d45c57ebd2655a7599df0f01b8b5e2f82eda7 (patch) | |
tree | ce23762b7478d06501080542a32993cedba14177 /gcc/gcc.cc | |
parent | 39ade88fa1632c659c5c4ed065fa2b62d16a8670 (diff) | |
download | gcc-327d45c57ebd2655a7599df0f01b8b5e2f82eda7.zip gcc-327d45c57ebd2655a7599df0f01b8b5e2f82eda7.tar.gz gcc-327d45c57ebd2655a7599df0f01b8b5e2f82eda7.tar.bz2 |
c++: "" #pragma at BOF [PR108504]
Since r11-2095 we pass flags to cp_lexer_get_preprocessor_token, and
cp_lexer_new_main passes C_LEX_STRING_NO_JOIN when lexing most of the
translation unit, but doesn't do that for the very first token; as a
result, if the first token is a string literal, we try to join strings and
get confused if that encounters a pragma.
PR c++/108504
gcc/cp/ChangeLog:
* parser.cc (cp_lexer_new_main): Pass C_LEX_STRING_NO_JOIN for first
token, too.
gcc/testsuite/ChangeLog:
* g++.dg/ext/pragma1.C: New test.
Diffstat (limited to 'gcc/gcc.cc')
0 files changed, 0 insertions, 0 deletions