Skip to content

Commit ba6cd4c

Browse files
tkoeppezygoloid
authored andcommitted
[cpp.subst] Reword paragraph to simplify the logical structure and avoid ambiguous references.
1 parent d4ff113 commit ba6cd4c

File tree

1 file changed

+18
-17
lines changed

1 file changed

+18
-17
lines changed

source/preprocessor.tex

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -743,23 +743,24 @@
743743
\pnum
744744
After the arguments for the invocation of a function-like macro have
745745
been identified, argument substitution takes place.
746-
A parameter in the replacement list --- unless it is
747-
\mname{VA_OPT}\tcode{(}\placeholder{content}\tcode{)}, preceded by a
748-
\tcode{\#}
749-
or
750-
\tcode{\#\#}
751-
preprocessing token, or followed by a
752-
\tcode{\#\#}
753-
preprocessing token (see below) ---
754-
is replaced by the corresponding argument after all macros
755-
contained therein have been expanded, in which case,
756-
each argument's preprocessing tokens are completely
757-
macro replaced before being substituted as if they formed the rest of the
758-
preprocessing file with
759-
no other preprocessing tokens being available.
760-
The replacement for \mname{VA_OPT}\tcode{(}\placeholder{content}\tcode{)}, unless preceded by a
761-
\tcode{\#} or \tcode{\#\#} preprocessing token or followed by a \tcode{\#\#}
762-
preprocessing token, is the preprocessing token sequence for the corresponding argument.
746+
For each parameter in the replacement list that is neither
747+
preceded by a \tcode{\#} or \tcode{\#\#} preprocessing token nor
748+
followed by a \tcode{\#\#} preprocessing token, the preprocessing tokens
749+
naming the parameter are replaced by a token sequence determined as follows:
750+
\begin{itemize}
751+
\item
752+
If the parameter is of the form
753+
\mname{VA_OPT}\tcode{(}\placeholder{content}\tcode{)},
754+
the replacement preprocessing tokens are the
755+
preprocessing token sequence for the corresponding argument.
756+
\item
757+
Otherwise, the replacement preprocessing tokens are the
758+
preprocessing tokens of corresponding argument after all
759+
macros contained therein have been expanded. The argument's
760+
preprocessing tokens are completely macro replaced before
761+
being substituted as if they formed the rest of the preprocessing
762+
file with no other preprocessing tokens being available.
763+
\end{itemize}
763764
\begin{example}
764765
\begin{codeblock}
765766
#define LPAREN() (

0 commit comments

Comments
 (0)