This is an unofficial snapshot of the ISO/IEC JTC1 SC22 WG21 Core Issues List revision 112e. See for the official list.


2693. Escape sequences for the string-literal of #line

Section: 15.7  [cpp.line]     Status: open     Submitter: CWG     Date: 2023-02-07     Liaison: WG14

The grammar for #line is inconsistent between 15.7 [cpp.line] paragraph 4:

# line digit-sequence " s-char-sequenceopt " new-line

and 15.7 [cpp.line] paragraph 1:

The string-literal of a #line directive, if present, shall be a character string literal.

The characters comprising the string-literal are not necessarily interpreted for e.g. escape sequences or universal-character-names, so the use of string-literal here is questionable. This directive names a source file, thus it might be better to use header-name (5.8 [lex.header]) instead.