Skip to content

Commit b272f17

Browse files
committed
[lex.header] Index both implementation-defined behaviors
The convenient English augmenting the set of characters that have implementation-defined semantics for a h-char-sequence does not lend itself to the `impldef` macro, so essentially create two duplicate sentences. Then the footnote does not clearly apply to either sentence, so turn it into a regular note. Next, to make the notes flow consistently, switch the order of note and normative text in the first paragraph to lead with the normative text. Finally, take this opportunity to clarify the specific characters called out using the Unicode nomenclature used throughout this clause.
1 parent f6b7ef3 commit b272f17

File tree

1 file changed

+18
-13
lines changed

1 file changed

+18
-13
lines changed

source/lex.tex

Lines changed: 18 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -660,31 +660,36 @@
660660
\end{bnf}
661661

662662
\pnum
663+
The sequences in both forms of \grammarterm{header-name}{s} are mapped in an
664+
\impldef{mapping header name to header or external source file} manner to headers or to
665+
external source file names as specified in~\ref{cpp.include}.
663666
\begin{note}
664-
Header name preprocessing tokens only appear within
667+
Header name preprocessing tokens appear only within
665668
a \tcode{\#include} preprocessing directive,
666669
a \tcode{__has_include} preprocessing expression, or
667670
after certain occurrences of an \tcode{import} token
668671
(see~\ref{lex.pptoken}).
669672
\end{note}
670-
The sequences in both forms of \grammarterm{header-name}{s} are mapped in an
671-
\impldef{mapping header name to header or external source file} manner to headers or to
672-
external source file names as specified in~\ref{cpp.include}.
673673

674674
\pnum
675-
The appearance of either of the characters \tcode{'} or \tcode{\textbackslash} or of
676-
either of the character sequences \tcode{/*} or \tcode{//} in a
677-
\grammarterm{q-char-sequence} or an \grammarterm{h-char-sequence}
678-
is conditionally-supported with \impldef{meaning of \tcode{'}, \tcode{\textbackslash},
679-
\tcode{/*}, or \tcode{//} in a \grammarterm{q-char-sequence} or an
680-
\grammarterm{h-char-sequence}} semantics, as is the appearance of the character
681-
\tcode{"} in an \grammarterm{h-char-sequence}.
682-
\begin{footnote}
675+
The appearance of either of the characters \unicode{0027}{apostrophe},
676+
\unicode{005c}{reverse solidus}, or of either of the character sequences
677+
\tcode{/*} or \tcode{//} in a \grammarterm{q-char-sequence} is
678+
conditionally-supported with
679+
\impldef{meaning in a \grammarterm{q-char-sequence} of \tcode{'},
680+
\tcode{\textbackslash}, \tcode{/*}, or \tcode{//}} semantics.
681+
The appearance of any of the characters \unicode{0022}{quotation mark},
682+
\unicode{0027}{apostrophe}, \unicode{005c}{reverse solidus}, or of either of the
683+
character sequences \tcode{/*} or \tcode{//} in a \grammarterm{h-char-sequence}
684+
is conditionally-supported with
685+
\impldef{meaning in a \grammarterm{h-char-sequence} of \tcode{""}, \tcode{'},
686+
\tcode{\textbackslash}, \tcode{/*}, or \tcode{//}} semantics.
687+
\begin{note}
683688
Thus, a sequence of characters
684689
that resembles an escape sequence can result in an error, be interpreted as the
685690
character corresponding to the escape sequence, or have a completely different meaning,
686691
depending on the implementation.
687-
\end{footnote}
692+
\end{note}
688693
\indextext{header!name|)}
689694

690695
\rSec1[lex.ppnumber]{Preprocessing numbers}

0 commit comments

Comments
 (0)