charset.c (UCS_LIMIT): New macro.
authorEric Botcazou <ebotcazou@adacore.com>
Thu, 26 Sep 2019 21:43:51 +0000 (21:43 +0000)
committerEric Botcazou <ebotcazou@gcc.gnu.org>
Thu, 26 Sep 2019 21:43:51 +0000 (21:43 +0000)
commit0900e29cdbc533fecf2a311447bbde17f101bbd6
tree99d96116ec1656e4b86de00444ee3569f3d46ba7
parentd7326aaf20871a81feb39673d78922c1bc83efec
charset.c (UCS_LIMIT): New macro.

* charset.c (UCS_LIMIT): New macro.
(ucn_valid_in_identifier): Use it instead of a hardcoded constant.
(_cpp_valid_ucn): Issue a pedantic warning for UCNs larger than
UCS_LIMIT outside of identifiers in C and in C++2a or later.

From-SVN: r276167
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/cpp/ucn-1.C
gcc/testsuite/g++.dg/cpp2a/ucn1.C [new file with mode: 0644]
gcc/testsuite/gcc.dg/attr-alias-5.c
gcc/testsuite/gcc.dg/cpp/ucs.c
gcc/testsuite/gcc.dg/cpp/utf8-5byte-1.c
libcpp/ChangeLog
libcpp/charset.c