This is an unofficial snapshot of the ISO/IEC JTC1 SC22 WG21 Core Issues List revision 115e. See http://www.open-std.org/jtc1/sc22/wg21/ for the official list.

2024-11-11


2573. Undefined behavior when splicing results in a universal-character-name

Section: 5.2  [lex.phases]     Status: DRWP     Submitter: US     Date: 2019-10-23     Liaison: SG12

[ Resolved by paper P2621R2 (Undefined behavior in the lexer), adopted in June, 2023. ]

(From National Body comments US 024 and US 025 on the C++20 DIS.)

Subclause 5.2 [lex.phases] bullet 1.2 specifies:

Except for splices reverted in a raw string literal, if a splice results in a character sequence that matches the syntax of a universal-character-name, the behavior is undefined.

Undefined behavior during lexing is not acceptable. The behavior ought to be well-defined, ill-formed, or conditionally-supported.

Additional notes (January, 2023):

Forwarded to SG12 with paper issue 1405, by decision of the CWG and SG12 chairs.