WG21 approved delimited escape sequences and named escape
sequences.
Adjust the extension warnings accordingly, and update
the release notes.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
@aaron.ballman I think we might as well do that now, and revert if WG21 does some funny business in plenary. WDYT?
LGTM! If for some very surprising reason either of these papers fail in plenary, we can easily revert this as necessary.
While accepting all these inside of string and character literals in C and C++20 and older is fine, accepting them inside of identifiers can change meaning of valid programs.
https://gcc.gnu.org/pipermail/gcc-patches/2022-August/600620.html
#define z(x) 0
#define a z(
int x = a\N{LATIN SMALL LETTER U WITH DIAERESIS});
int y = a\u{1234});
int z = a\U{12345678});
While accepting all these inside of string and character literals in C and C++20 and older is fine, accepting them inside of identifiers can change meaning of valid programs.
Thank you for reporting this impact, @jakubjelinek! I'll copy you on an email to WG21 that discussed the impact, specifically with regard to the glibc header for which Joseph reported failures.