Skip to content

Commit ecf79f7

Browse files
committed
[cpp.line] Address string-literal vs s-char-sequence
The text of this specification places a restriction on a string-literal that is not present in the grammar, although the grammar is an exact match for a string-literal with that restriction. The restricted term is also used when specifying the effects of the line directive with a string, so prefer to move string-literal into the grammar rather than strike that paragraph and adjust the effects. Added a cross-reference to where character string literal is defined as it may not be obvious to all readers that this is a term of power, even though it is defined as a term and has an index entry.
1 parent eb4dcbd commit ecf79f7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

source/preprocessor.tex

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2074,7 +2074,7 @@
20742074
The \grammarterm{string-literal} of a
20752075
\tcode{\#line}
20762076
directive, if present,
2077-
shall be a character string literal.
2077+
shall be a character string literal\iref{cpp.stringize}.
20782078

20792079
\pnum
20802080
The
@@ -2102,7 +2102,7 @@
21022102
\pnum
21032103
A preprocessing directive of the form
21042104
\begin{ncsimplebnf}
2105-
\terminal{\# line} digit-sequence \terminal{"} \opt{s-char-sequence} \terminal{"} new-line
2105+
\terminal{\# line} digit-sequence \terminal{"} \opt{string-literal} \terminal{"} new-line
21062106
\end{ncsimplebnf}
21072107
sets the presumed line number similarly and changes the
21082108
presumed name of the source file to be the contents

0 commit comments

Comments
 (0)