P4136R1 — #line is not in line with existing practices
Corentin Jabot
CWG
Revisions R2May 2026R1Apr 2026R0Apr 2026
line-directive: # line pp-tokens new-line The string-literal of a #line directive, if present, shall be a character string literal. The line number of the current source line is the line number of the current physical source line, i.e., it is one greater than the number of new-line characters read or introduced in translation phase 1[lex.phases] while processing the source file to the current preprocessing token. A preprocessing directive of the form # line digit-sequence new-line causes the implementation to behave as if the following sequence of source lines begins with a source line that has a line number as specified by the digit sequence (interpreted as a decimal integer). If the digit sequence specifies zero or a number greater than 2147483647, the <del>behavior is undefined</del> <ins>program is ill-formed</ins>.