Skip to content

[pre] No names in the preprocessor#8136

Merged
tkoeppe merged 1 commit into
cplusplus:mainfrom
AlisdairM:no_names_in_preprocessor
Nov 3, 2025
Merged

[pre] No names in the preprocessor#8136
tkoeppe merged 1 commit into
cplusplus:mainfrom
AlisdairM:no_names_in_preprocessor

Conversation

@AlisdairM

@AlisdairM AlisdairM commented Jul 31, 2025

Copy link
Copy Markdown
Contributor

The term "name" applies specifically to entities in phase 7 of translation. Macros have macro names, headers are parsed as header-names, etc.

Specifically, names are introduced by declarations, [basic.pre]p5, and there are no declarations in the preprocessor.

Comment thread source/preprocessor.tex Outdated
@AlisdairM AlisdairM force-pushed the no_names_in_preprocessor branch from e86e370 to 402ae47 Compare August 1, 2025 12:28
@tkoeppe tkoeppe requested a review from jensmaurer October 31, 2025 15:27
@tkoeppe

tkoeppe commented Oct 31, 2025

Copy link
Copy Markdown
Contributor

I'm not sure if this requires clarification -- e.g. in "the name of the macro", isn't it clear that the name is a macro name?

@jensmaurer, any thoughts?

@jensmaurer

Copy link
Copy Markdown
Member

[cpp.replace.general] p8 does define the term "macro name".

Reading through the diff here, I think there are a few places that definitely benefit from replacing "name" with something else entirely or with "macro name".

Others, such as "macro name of a macro", sound awfully redundant, and I think we want a larger rephrasing to warrant the departure from "identical phrasing in C" for those cases.

Going through the diff one-by-one and marking those that seem redundant / need more rephrasing.

@jensmaurer jensmaurer left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you would remove the four marked changes, this rest feels like an obvious improvement.

Comment thread source/preprocessor.tex Outdated
Comment thread source/preprocessor.tex Outdated
Comment thread source/preprocessor.tex Outdated
Comment thread source/preprocessor.tex Outdated
The term "name" applies specifically to entities in phase 7
of translation.  Macros have macro names, headers are parsed
as *header-name*s, etc.
@AlisdairM AlisdairM force-pushed the no_names_in_preprocessor branch from 402ae47 to ba25e78 Compare November 2, 2025 21:46
@AlisdairM

Copy link
Copy Markdown
Contributor Author

I have reverted the changes that Jens requested.
I made an alternative suggestion to one in the review for potential follow-up, but reverted in the PR to aid progress.

@tkoeppe tkoeppe requested a review from jensmaurer November 3, 2025 05:33
@tkoeppe tkoeppe merged commit 749103f into cplusplus:main Nov 3, 2025
2 checks passed
@AlisdairM AlisdairM deleted the no_names_in_preprocessor branch November 3, 2025 23:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants