diff options
author | Jakub Jelinek <jakub@redhat.com> | 2022-08-20 10:26:55 +0200 |
---|---|---|
committer | Jakub Jelinek <jakub@redhat.com> | 2022-08-20 10:26:55 +0200 |
commit | e9dd050e0ccd644c3bb6d6538dc6187157f6b3e8 (patch) | |
tree | 83db1180a30890d65465b55a54be1e8a30cc1534 /libcpp/files.cc | |
parent | 613e9e16b85e209fad316deaef33cfaf7bd2bc98 (diff) | |
download | gcc-e9dd050e0ccd644c3bb6d6538dc6187157f6b3e8.zip gcc-e9dd050e0ccd644c3bb6d6538dc6187157f6b3e8.tar.gz gcc-e9dd050e0ccd644c3bb6d6538dc6187157f6b3e8.tar.bz2 |
libcpp: Implement C++23 P2290R3 - Delimited escape sequences [PR106645]
The following patch implements the C++23 P2290R3 paper.
2022-08-20 Jakub Jelinek <jakub@redhat.com>
PR c++/106645
libcpp/
* include/cpplib.h (struct cpp_options): Implement
P2290R3 - Delimited escape sequences. Add delimite_escape_seqs
member.
* init.cc (struct lang_flags): Likewise.
(lang_defaults): Add delim column.
(cpp_set_lang): Copy over delimite_escape_seqs.
* charset.cc (extend_char_range): New function.
(_cpp_valid_ucn): Use it. Handle delimited escape sequences.
(convert_hex): Likewise.
(convert_oct): Likewise.
(convert_ucn): Use extend_char_range.
(convert_escape): Call convert_oct even for \o.
(_cpp_interpret_identifier): Handle delimited escape sequences.
* lex.cc (get_bidi_ucn_1): Likewise. Add end argument, fill it in.
(get_bidi_ucn): Adjust get_bidi_ucn_1 caller. Use end argument to
compute num_bytes.
gcc/testsuite/
* c-c++-common/cpp/delimited-escape-seq-1.c: New test.
* c-c++-common/cpp/delimited-escape-seq-2.c: New test.
* c-c++-common/cpp/delimited-escape-seq-3.c: New test.
* c-c++-common/Wbidi-chars-24.c: New test.
* gcc.dg/cpp/delimited-escape-seq-1.c: New test.
* gcc.dg/cpp/delimited-escape-seq-2.c: New test.
* g++.dg/cpp/delimited-escape-seq-1.C: New test.
* g++.dg/cpp/delimited-escape-seq-2.C: New test.
Diffstat (limited to 'libcpp/files.cc')
0 files changed, 0 insertions, 0 deletions