]> git.ipfire.org Git - people/ms/gcc.git/commit
libcpp: Implement P2362R3 - Remove non-encodable wide character literals and multicha...
authorJakub Jelinek <jakub@redhat.com>
Fri, 26 Aug 2022 14:06:20 +0000 (16:06 +0200)
committerJakub Jelinek <jakub@redhat.com>
Fri, 26 Aug 2022 14:06:20 +0000 (16:06 +0200)
commitdad2d3e003f1a9885cb1fa0f67baf50f62d57b06
treedd09e97ddda8c8a0e00f8fc84c6df4de89c1dc8f
parent8e08906973cc10748d956388c8ceefa726abc83c
libcpp: Implement P2362R3 - Remove non-encodable wide character literals and multicharacter [PR106647]

My understanding of the paper is that we just want to promote the CPP_WCHAR
"character constant too long for its type" warning to error as it is already
error for u8, u and U literals.

2022-08-26  Jakub Jelinek  <jakub@redhat.com>

PR c++/106647
* charset.cc (wide_str_to_charconst): Implement P2362R3 - Remove
non-encodable wide character literals and multicharacter.  For
C++23 use CPP_DL_ERROR instead of CPP_DL_WARNING for
"character constant too long for its type" diagnostics on CPP_WCHAR
literals.

* g++.dg/cpp23/wchar-multi1.C: New test.
* g++.dg/cpp23/wchar-multi2.C: New test.
gcc/testsuite/g++.dg/cpp23/wchar-multi1.C [new file with mode: 0644]
gcc/testsuite/g++.dg/cpp23/wchar-multi2.C [new file with mode: 0644]
libcpp/charset.cc