Skip to content

Commit d43a454

Browse files
committed
[cpp.cond] Keywords are not identifiers while preprocessing
1 parent 2ab6288 commit d43a454

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

source/preprocessor.tex

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -553,15 +553,19 @@
553553
\grammarterm{has-embed-expression}s, and
554554
\grammarterm{has-attribute-expression}s
555555
have been performed,
556-
all remaining identifiers and keywords,
556+
all remaining identifiers
557557
except for
558558
\tcode{true}
559559
and
560-
\tcode{false},
560+
\tcode{false}
561561
are replaced with the \grammarterm{pp-number}
562562
\tcode{0},
563563
and then each preprocessing token is converted into a token.
564564
\begin{note}
565+
Keywords are identifiers during preprocessing and are not valid macro names,
566+
so are always replaced by \tcode{0} before being converted into a token.
567+
\end{note}
568+
\begin{note}
565569
An alternative
566570
token\iref{lex.digraph} is not an identifier,
567571
even when its spelling consists entirely of letters and underscores.

0 commit comments

Comments
 (0)