diff options
author | Paolo Carlini <paolo@gcc.gnu.org> | 2015-07-02 18:54:41 +0000 |
---|---|---|
committer | Paolo Carlini <paolo@gcc.gnu.org> | 2015-07-02 18:54:41 +0000 |
commit | fbb22910cfa4e4567b46fc8b74ccfad92fa745d8 (patch) | |
tree | 2aac293a422c002719640bf2767fde8c557ab77b /gcc | |
parent | a05d02b293b299352b9523875e96bf697f96baf4 (diff) | |
download | gcc-fbb22910cfa4e4567b46fc8b74ccfad92fa745d8.zip gcc-fbb22910cfa4e4567b46fc8b74ccfad92fa745d8.tar.gz gcc-fbb22910cfa4e4567b46fc8b74ccfad92fa745d8.tar.bz2 |
re PR preprocessor/53690 ([C++11] \u0000 and \U00000000 are wrongly encoded as U+0001.)
/libcpp
2015-07-02 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/53690
* charset.c (_cpp_valid_ucn): Add cppchar_t * parameter and change
return type to bool. Fix encoding of \u0000 and \U00000000 in C++.
(convert_ucn): Adjust call.
* lex.c (forms_identifier_p): Likewise.
* internal.h (_cpp_valid_ucn): Adjust declaration.
/gcc/testsuite
2015-07-02 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/53690
* g++.dg/cpp/pr53690.C: New.
From-SVN: r225353
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/g++.dg/cpp/pr53690.C | 7 |
2 files changed, 12 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 8d7005f..530f8fc 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2015-07-02 Paolo Carlini <paolo.carlini@oracle.com> + + PR c++/53690 + * g++.dg/cpp/pr53690.C: New. + 2015-07-02 Bill Schmidt <wschmidt@linux.vnet.ibm.com> * gcc.target/powerpc/vec-cmp.c: New test. diff --git a/gcc/testsuite/g++.dg/cpp/pr53690.C b/gcc/testsuite/g++.dg/cpp/pr53690.C new file mode 100644 index 0000000..ea91359 --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp/pr53690.C @@ -0,0 +1,7 @@ +// PR c++/53690 +// { dg-do compile { target c++11 } } + +int array1[U'\U00000000' == 0 ? 1 : -1]; +int array2[U'\u0000' == 0 ? 1 : -1]; +int array3[u'\U00000000' == 0 ? 1 : -1]; +int array4[u'\u0000' == 0 ? 1 : -1]; |