Title
Escape sequences for the string-literal of #line
Status
open
Section
15.7 [cpp.line]
Submitter
CWG

Created on 2023-02-07.00:00:00 last changed 12 months ago

Messages

Date: 2023-02-07.00:00:00

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.

History
Date User Action Args
2023-02-07 00:00:00admincreate