-
- Downloads
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
Showing
- gcc/ChangeLog 7 additions, 0 deletionsgcc/ChangeLog
- gcc/doc/cpp.texi 17 additions, 15 deletionsgcc/doc/cpp.texi
- gcc/doc/cppopts.texi 3 additions, 2 deletionsgcc/doc/cppopts.texi
- gcc/testsuite/ChangeLog 39 additions, 0 deletionsgcc/testsuite/ChangeLog
- gcc/testsuite/c-c++-common/cpp/ucnid-2011-1-utf8.c 15 additions, 0 deletionsgcc/testsuite/c-c++-common/cpp/ucnid-2011-1-utf8.c
- gcc/testsuite/g++.dg/cpp/ucnid-1-utf8.C 17 additions, 0 deletionsgcc/testsuite/g++.dg/cpp/ucnid-1-utf8.C
- gcc/testsuite/g++.dg/cpp/ucnid-2-utf8.C 24 additions, 0 deletionsgcc/testsuite/g++.dg/cpp/ucnid-2-utf8.C
- gcc/testsuite/g++.dg/cpp/ucnid-3-utf8.C 23 additions, 0 deletionsgcc/testsuite/g++.dg/cpp/ucnid-3-utf8.C
- gcc/testsuite/g++.dg/cpp/ucnid-4-utf8.C 17 additions, 0 deletionsgcc/testsuite/g++.dg/cpp/ucnid-4-utf8.C
- gcc/testsuite/g++.dg/other/ucnid-1-utf8.C 28 additions, 0 deletionsgcc/testsuite/g++.dg/other/ucnid-1-utf8.C
- gcc/testsuite/gcc.dg/cpp/ucnid-1-utf8.c 26 additions, 0 deletionsgcc/testsuite/gcc.dg/cpp/ucnid-1-utf8.c
- gcc/testsuite/gcc.dg/cpp/ucnid-10-utf8.c 8 additions, 0 deletionsgcc/testsuite/gcc.dg/cpp/ucnid-10-utf8.c
- gcc/testsuite/gcc.dg/cpp/ucnid-11-utf8.c 30 additions, 0 deletionsgcc/testsuite/gcc.dg/cpp/ucnid-11-utf8.c
- gcc/testsuite/gcc.dg/cpp/ucnid-12-utf8.c 13 additions, 0 deletionsgcc/testsuite/gcc.dg/cpp/ucnid-12-utf8.c
- gcc/testsuite/gcc.dg/cpp/ucnid-13-utf8.c 5 additions, 0 deletionsgcc/testsuite/gcc.dg/cpp/ucnid-13-utf8.c
- gcc/testsuite/gcc.dg/cpp/ucnid-14-utf8.c 6 additions, 0 deletionsgcc/testsuite/gcc.dg/cpp/ucnid-14-utf8.c
- gcc/testsuite/gcc.dg/cpp/ucnid-15-utf8.c 6 additions, 0 deletionsgcc/testsuite/gcc.dg/cpp/ucnid-15-utf8.c
- gcc/testsuite/gcc.dg/cpp/ucnid-2-utf8.c 16 additions, 0 deletionsgcc/testsuite/gcc.dg/cpp/ucnid-2-utf8.c
- gcc/testsuite/gcc.dg/cpp/ucnid-3-utf8.c 7 additions, 0 deletionsgcc/testsuite/gcc.dg/cpp/ucnid-3-utf8.c
- gcc/testsuite/gcc.dg/cpp/ucnid-4-utf8.c 17 additions, 0 deletionsgcc/testsuite/gcc.dg/cpp/ucnid-4-utf8.c
Loading
Please register or sign in to comment