diff options
Diffstat (limited to 'libcpp')
-rw-r--r-- | libcpp/charset.cc | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/libcpp/charset.cc b/libcpp/charset.cc index 47a36d8..d3c07d6 100644 --- a/libcpp/charset.cc +++ b/libcpp/charset.cc @@ -2593,7 +2593,11 @@ wide_str_to_charconst (cpp_reader *pfile, cpp_string str, character constant is guaranteed to overflow. */ if (str.len > nbwc * 2) cpp_error (pfile, (CPP_OPTION (pfile, cplusplus) - && (type == CPP_CHAR16 || type == CPP_CHAR32)) + && (type == CPP_CHAR16 + || type == CPP_CHAR32 + /* In C++23 this is error even for L'ab'. */ + || (type == CPP_WCHAR + && CPP_OPTION (pfile, size_t_literals)))) ? CPP_DL_ERROR : CPP_DL_WARNING, "character constant too long for its type"); |