C++29 named universal character escapes implemented.
Adds support for more named universal character escapes as defined in C++29 P3733R1.
This change implements support for additional named universal character escapes, aligning GCC’s C preprocessor (libcpp) with the C++29 standard as specified in P3733R1. The implementation updates the internal mapping of character escapes and adjusts associated test cases to reflect the new standard, ensuring correct preprocessing for C++29 code utilizing these advanced character representations.
In Details
Updates the __cpp_named_character_escapes feature macro from 202207L to 202606L to reflect the adoption of C++29 P3733R1. The makeuname2c utility in libcpp is modified to incorporate figment and abbreviation aliases, and corresponding test cases in gcc/testsuite are updated or added to validate the new escapes.
- universal character escapes
- Character escape sequences (e.g.,
\uXXXXor\UXXXXXXXX) used in C and C++ to represent characters outside the basic character set, typically using their Unicode code points. - named universal character escapes
- A feature allowing named sequences for universal character escapes, such as
\N{GRAPHEME}, providing a more readable way to represent specific Unicode characters. - libcpp
- The C++ standard library implementation used by GCC, which includes the preprocessor (cpp).
- C++29
- The upcoming revision of the C++ programming language standard. Features designated for C++29 are often ratified through papers and then implemented in compilers.
- DR
- Defect Report. A formal document describing an issue or ambiguity in a C or C++ standard. Compilers may implement fixes for DRs as Directional Recommendations.