gcc/libcpp
Lewis Hyatt 7d112d6670 Support extended characters in C/C++ identifiers (PR c/67224)
libcpp/ChangeLog
2019-09-19  Lewis Hyatt  <lhyatt@gmail.com>

	PR c/67224
	* charset.c (_cpp_valid_utf8): New function to help lex UTF-8 tokens.
	* internal.h (_cpp_valid_utf8): Declare.
	* lex.c (forms_identifier_p): Use it to recognize UTF-8 identifiers.
	(_cpp_lex_direct): Handle UTF-8 in identifiers and CPP_OTHER tokens.
	Do all work in "default" case to avoid slowing down typical code paths.
	Also handle $ and UCN in the default case for consistency.

gcc/Changelog
2019-09-19  Lewis Hyatt  <lhyatt@gmail.com>

	PR c/67224
	* doc/cpp.texi: Document support for extended characters in
	identifiers.
	* doc/cppopts.texi: Likewise.

gcc/testsuite/ChangeLog
2019-09-19  Lewis Hyatt  <lhyatt@gmail.com>

	PR c/67224
	* c-c++-common/cpp/ucnid-2011-1-utf8.c: New test.
	* g++.dg/cpp/ucnid-1-utf8.C: New test.
	* g++.dg/cpp/ucnid-2-utf8.C: New test.
	* g++.dg/cpp/ucnid-3-utf8.C: New test.
	* g++.dg/cpp/ucnid-4-utf8.C: New test.
	* g++.dg/other/ucnid-1-utf8.C: New test.
	* gcc.dg/cpp/ucnid-1-utf8.c: New test.
	* gcc.dg/cpp/ucnid-10-utf8.c: New test.
	* gcc.dg/cpp/ucnid-11-utf8.c: New test.
	* gcc.dg/cpp/ucnid-12-utf8.c: New test.
	* gcc.dg/cpp/ucnid-13-utf8.c: New test.
	* gcc.dg/cpp/ucnid-14-utf8.c: New test.
	* gcc.dg/cpp/ucnid-15-utf8.c: New test.
	* gcc.dg/cpp/ucnid-2-utf8.c: New test.
	* gcc.dg/cpp/ucnid-3-utf8.c: New test.
	* gcc.dg/cpp/ucnid-4-utf8.c: New test.
	* gcc.dg/cpp/ucnid-6-utf8.c: New test.
	* gcc.dg/cpp/ucnid-7-utf8.c: New test.
	* gcc.dg/cpp/ucnid-9-utf8.c: New test.
	* gcc.dg/ucnid-1-utf8.c: New test.
	* gcc.dg/ucnid-10-utf8.c: New test.
	* gcc.dg/ucnid-11-utf8.c: New test.
	* gcc.dg/ucnid-12-utf8.c: New test.
	* gcc.dg/ucnid-13-utf8.c: New test.
	* gcc.dg/ucnid-14-utf8.c: New test.
	* gcc.dg/ucnid-15-utf8.c: New test.
	* gcc.dg/ucnid-16-utf8.c: New test.
	* gcc.dg/ucnid-2-utf8.c: New test.
	* gcc.dg/ucnid-3-utf8.c: New test.
	* gcc.dg/ucnid-4-utf8.c: New test.
	* gcc.dg/ucnid-5-utf8.c: New test.
	* gcc.dg/ucnid-6-utf8.c: New test.
	* gcc.dg/ucnid-7-utf8.c: New test.
	* gcc.dg/ucnid-8-utf8.c: New test.
	* gcc.dg/ucnid-9-utf8.c: New test.

From-SVN: r275979
2019-09-19 20:56:11 +01:00
..
include PR c++/61339 - add mismatch between struct and class [-Wmismatched-tags] to non-bugs 2019-07-09 12:32:49 -06:00
po * zh_TW.po: Update. 2019-08-09 23:02:08 +01:00
aclocal.m4
ChangeLog Support extended characters in C/C++ identifiers (PR c/67224) 2019-09-19 20:56:11 +01:00
ChangeLog.jit
charset.c Support extended characters in C/C++ identifiers (PR c/67224) 2019-09-19 20:56:11 +01:00
config.in
configure
configure.ac
directives-only.c [Preprocessor] small cleanups 2019-08-28 18:43:37 +00:00
directives.c [preprocessor] Popping "" file names 2019-09-06 12:54:19 +00:00
errors.c
expr.c Remove Cell Broadband Engine SPU targets 2019-09-03 15:08:28 +00:00
files.c [preprocessor/91639] #includes at EOF 2019-09-05 11:23:48 +00:00
identifiers.c
init.c [preprocessor] Include stacking 2019-08-29 14:06:32 +00:00
internal.h Support extended characters in C/C++ identifiers (PR c/67224) 2019-09-19 20:56:11 +01:00
lex.c Support extended characters in C/C++ identifiers (PR c/67224) 2019-09-19 20:56:11 +01:00
line-map.c [preprocessor/91639] #includes at EOF 2019-09-05 11:23:48 +00:00
location-example.txt
macro.c
Makefile.in
makeucnid.c
mkdeps.c PR c++/61339 - add mismatch between struct and class [-Wmismatched-tags] to non-bugs 2019-07-09 12:32:49 -06:00
pch.c
symtab.c Improve memory statistics report readability. 2019-02-26 17:27:52 +00:00
system.h
traditional.c
ucnid.h
ucnid.tab