Skip to content

[pre] No names in the preprocessor #8136

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions source/preprocessor.tex
Original file line number Diff line number Diff line change
Expand Up @@ -500,7 +500,7 @@
directives, and
the \tcode{defined} conditional inclusion operator,
shall treat \xname{has_include}, \xname{has_embed}, and \xname{has_cpp_attribute}
as if they were the names of defined macros.
as if they were the macro names of defined macros.
The identifiers \xname{has_include}, \xname{has_embed}, and \xname{has_cpp_attribute}
shall not appear in any context not mentioned in this subclause.

Expand Down Expand Up @@ -618,7 +618,7 @@
Each directive's condition is checked in order.
If it evaluates to false (zero),
the group that it controls is skipped:
directives are processed only through the name that determines
directives are processed only through the directive name that determines
the directive in order to keep track of the level
of nested conditionals;
the rest of the directives' preprocessing tokens are ignored,
Expand Down Expand Up @@ -1045,7 +1045,7 @@
\end{note}
\begin{example}
If the directive matches the second form, the whole directive is replaced.
If the directive matches the first form, everything after the name is replaced.
If the directive matches the first form, everything after the \grammarterm{header-name} is replaced.
\begin{codeblock}
#define EMPTY
#define X myfile
Expand Down Expand Up @@ -1532,11 +1532,11 @@
\pnum
\indextext{unit!translation}%
A translation unit shall not \tcode{\#define} or \tcode{\#undef}
names lexically identical
macro names lexically identical
to keywords,
to the identifiers listed in \tref{lex.name.special}, or
to the \grammarterm{attribute-token}{s} described in~\ref{dcl.attr},
except that the names \tcode{likely} and \tcode{unlikely} may be
except that the macro names \tcode{likely} and \tcode{unlikely} may be
defined as function-like macros.

\pnum
Expand Down Expand Up @@ -1571,7 +1571,7 @@
An alternative token\iref{lex.digraph} is not an identifier,
even when its spelling consists entirely of letters and underscores.
Therefore it is not possible to define a macro
whose name is the same as that of an alternative token.
whose macro name is the same as that of an alternative token.
\end{footnote}
The replacement list is then rescanned for more macro names as
specified below.
Expand Down Expand Up @@ -2022,12 +2022,12 @@
\end{example}

\pnum
If the name of the macro being replaced is found during this scan of
If the macro name of the macro being replaced is found during this scan of
the replacement list
(not including the rest of the source file's preprocessing tokens),
it is not replaced.
Furthermore,
if any nested replacements encounter the name of the macro being replaced,
if any nested replacements encounter the macro name of the macro being replaced,
it is not replaced.
These nonreplaced macro name preprocessing tokens are no longer available
for further replacement even if they are later (re)examined in contexts
Expand Down Expand Up @@ -2191,7 +2191,7 @@
replace the value of this macro with a greater value.
\end{note}

\item The names listed in \tref{cpp.predefined.ft}.\\
\item The macro names listed in \tref{cpp.predefined.ft}.\\
The macros defined in \tref{cpp.predefined.ft} shall be defined to
the corresponding integer literal.
\begin{note}
Expand Down