Skip to content
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

[cpp.concat] p3 Is a placemarker preprocessing token considered as a valid preporcessing token #5629

Open
xmh0511 opened this issue Jul 19, 2022 · 0 comments

Comments

@xmh0511
Copy link
Contributor

xmh0511 commented Jul 19, 2022

[cpp.concat] p3 says

If the result is not a valid preprocessing token, the behavior is undefined.

#define concat(X,Y) X##Y
concat(,)   // #1

The result of concat(,) is a single placemarker preprocessing token(result from the concatenation of two placemarker preprocessing tokens).

[lex.pptoken] specifies all normative preprocessing tokens, which does not mention placemarker preprocessing token. The note also says that:

Placemarker preprocessing tokens do not appear in the syntax because they are temporary entities that exist only within translation phase 4.

It is unclear whether the "valid preprocessing token" refers to the preprocessing tokens defined in [lex.pptoken] or refers to the tokens in [lex.pptoken] and the placemarker preprocessing token. Presumably, it refers to the latter. Furhtermore, the text "preprocessing token" in [cpp] intends to include the syntax preprocessing tokens and the placemarker preprocessing token.

[cpp.concat] p3 may be clearer if it is changed to

If the result is not a valid preprocessing token(include placemarker preprocessing token), the behavior is undefined.

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

No branches or pull requests

1 participant