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

GB-055 9.12.1p6 [dcl.attr.grammar] Ignoring standard attributes #430

Closed
wg21bot opened this issue Oct 23, 2022 · 4 comments · Fixed by cplusplus/draft#5990
Closed

GB-055 9.12.1p6 [dcl.attr.grammar] Ignoring standard attributes #430

wg21bot opened this issue Oct 23, 2022 · 4 comments · Fixed by cplusplus/draft#5990
Labels
Milestone

Comments

@wg21bot
Copy link
Collaborator

wg21bot commented Oct 23, 2022

It is unclear whether implementations can ignore standard attributes.
The standard states: "Any attribute-token that is not recognized by the implementation is ignored."
It is unclear whether this applies to attributes listed in the standard itself.

See CWG2538 and P2552R0.

@wg21bot wg21bot added the EWG Evolution label Oct 23, 2022
@wg21bot wg21bot added this to the CD C++23 milestone Oct 23, 2022
@jfbastien
Copy link
Collaborator

jfbastien commented Oct 30, 2022

@jensmaurer jensmaurer changed the title GB 9.12.1p6 [dcl.attr.grammar] Ignoring standard attributes GB-055 9.12.1p6 [dcl.attr.grammar] Ignoring standard attributes Nov 3, 2022
@jfbastien jfbastien added has-paper joint-cwg-ewg CWG+EWG joint session labels Nov 4, 2022
@erichkeane
Copy link

From D2552R1, we support the adoption of the proposed wording for option 1.A on Syntactic ignorability: Specify that standard attributes cannot be syntactically ignored for C++23 (= adopt proposed resolution for CWG2538 as recommended by CWG).

SF F N A SA
14 14 6 1 6

Result: Consensus

From D2552R1, we support the adoption of the proposed wording for option 1.B on Syntactic ignorability: Specify that standard attributes can be syntactically ignored for C++23 (= parsed as a balanced-token-sequence and then skipped entirely; argument clause and appertainment do not need to be syntax checked; entities inside the argument clause do not need to be ODR-used).

SF F N A SA
9 6 9 11 6

Result: No Consensus

From D2552R1, we want to adopt wording for option 2.A on Semantic ignorability: Specify that standard attributes are meant to be semantically ignorable, and what this means exactly, normatively in the C++ standard, for C++23.

SF F N A SA
3 7 16 6 4

Result: No Consensus

From D2552R1, we want to adopt wording for option 2.B on Semantic ignorability: Specify this in a separate new Standing Document (SD) instead. This SD might also contain other design principles for new language features.

SF F N A SA
1 11 14 9 1

Result: No Consensus

From D2552R1, we would want to adopt wording for option 3.A on __has_cpp_attribute: Specify that __has_cpp_attribute should return a positive value for a standard attribute only if an an implementation has a useful implementation of its semantics (GCC behaviour).

SF F N A SA
8 15 11 7 2

Result: No Consensus

From D2552R1, we would want to adopt wording for option 3.B on __has_cpp_attribute: Specify that __has_cpp_attribute should also return a positive value for a standard attribute if an implementation can syntax-parse it, even if it does not implement any useful semantics (Clang and ICC behaviour).

SF F N A SA
9 7 12 11 2

Result: No Consensus

@jfbastien jfbastien added CWG Core and removed EWG Evolution labels Nov 8, 2022
@jensmaurer
Copy link
Member

CWG2538

@jensmaurer
Copy link
Member

CWG 2022-11-08: Approved CWG2538.

Accepted with Modifications. Attributes specified by the standard cannot be syntactically ignored; see CWG2538 for details.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
4 participants