Skip to content

Commit 4fc3903

Browse files
eisenwavetkoeppe
authored andcommitted
CWG3076 Remove unnecessary IFNDR for malformed header-name-tokens
1 parent 3243d8e commit 4fc3903

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

source/lex.tex

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1795,10 +1795,15 @@
17951795
\indextext{literal!string}%
17961796
\begin{bnf}
17971797
\nontermdef{string-literal}\br
1798-
\opt{encoding-prefix} \terminal{"} \opt{s-char-sequence} \terminal{"}\br
1798+
\opt{encoding-prefix} plain-string-literal\br
17991799
\opt{encoding-prefix} \terminal{R} raw-string
18001800
\end{bnf}
18011801

1802+
\begin{bnf}
1803+
\nontermdef{plain-string-literal}\br
1804+
\terminal{"} \opt{s-char-sequence} \terminal{"}
1805+
\end{bnf}
1806+
18021807
\begin{bnf}
18031808
\nontermdef{s-char-sequence}\br
18041809
s-char \opt{s-char-sequence}

source/preprocessor.tex

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -757,6 +757,9 @@
757757
in the directive are processed just as in normal text
758758
(i.e., each identifier currently defined as a macro name is replaced by its
759759
replacement list of preprocessing tokens).
760+
After replacement,
761+
if the first preprocessing token is a \grammarterm{string-literal},
762+
it shall be a \grammarterm{plain-string-literal}.
760763
Then, an attempt is made to form a \grammarterm{header-name}
761764
preprocessing token\iref{lex.header} from the whitespace and the characters
762765
of the spellings of the resulting sequence of preprocessing tokens;

0 commit comments

Comments
 (0)