diff options
Diffstat (limited to 'libcpp/charset.cc')
| -rw-r--r-- | libcpp/charset.cc | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/libcpp/charset.cc b/libcpp/charset.cc index 54d7b9e0932..d58319a500a 100644 --- a/libcpp/charset.cc +++ b/libcpp/charset.cc @@ -1808,7 +1808,12 @@ _cpp_valid_ucn (cpp_reader *pfile, const uchar **pstr, result = 1; } else if (identifier_pos && result == 0x24 - && CPP_OPTION (pfile, dollars_in_ident)) + && CPP_OPTION (pfile, dollars_in_ident) + /* In C++26 when dollars are allowed in identifiers, + we should still reject \u0024 as $ is part of the basic + character set. */ + && !(CPP_OPTION (pfile, cplusplus) + && CPP_OPTION (pfile, lang) > CLK_CXX23)) { if (CPP_OPTION (pfile, warn_dollars) && !pfile->state.skipping) { |
