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

P2156 Allow Duplicate Attributes #864

Closed
wg21bot opened this issue Apr 24, 2020 · 5 comments
Closed

P2156 Allow Duplicate Attributes #864

wg21bot opened this issue Apr 24, 2020 · 5 comments

Comments

@wg21bot
Copy link
Collaborator

@wg21bot wg21bot commented Apr 24, 2020

P2156R0 Allow Duplicate Attributes (Erich Keane)

@wg21bot wg21bot added this to the 2020-telecon milestone Apr 24, 2020
@jensmaurer jensmaurer removed the CWG label Apr 24, 2020
@jfbastien jfbastien removed the EWGI label Apr 24, 2020
@jfbastien
Copy link
Collaborator

@jfbastien jfbastien commented Jul 24, 2020

Discussed in EWG telecon on July 2nd:

P2156R0 is tentatively ready to move to CWG, once we can forward to Core (modulo no_unique_addr wording)

SF F N A SA
5 5 1 0 0

@wg21bot
Copy link
Collaborator Author

@wg21bot wg21bot commented Aug 1, 2020

P2156R1 Allow Duplicate Attributes (Erich Keane)

@jensmaurer jensmaurer removed this from the 2020-telecon milestone Dec 28, 2020
@jensmaurer jensmaurer added this to the 2021-telecon milestone Dec 28, 2020
@AaronBallman
Copy link
Collaborator

@AaronBallman AaronBallman commented Jan 22, 2021

This paper does not need to be seen by SG22 as it was already seen by WG14 as part of WG14 N2557, which was approved at the Oct 2020 meeting.

Straw Poll: Is the committee in favor of adopting N2557 into C23? 19-0-0

@jensmaurer jensmaurer added this to Ready for review in CWG Feb 2, 2021
@jfbastien
Copy link
Collaborator

@jfbastien jfbastien commented Mar 9, 2021

EWG February 2021 polls:

Poll: Forward P2156R1 "Allow Duplicate Attributes" to Core, thereby also fixing [CWG1914].

SF F N A SA
12 11 3 1 1

Poll outcome: consensus.

Salient comments:

  • (Against / Strongly against) The use case (macro replacement) is questionable, especially for cases where the same attribute has different values. It also further complicates future extensions for reflection on attributes. We can resolved CWG1914 by declaring that the particular attributes mentioned there could not be specified more than once on a declaration, even in separate attribute specifiers.
  • In practice, attributes are often hidden in macros and it is easy to get duplicates, and fixing the duplication is challenging in code that supports many compilers and standards.
  • Especially useful for auto-generated code.
  • It is easier on developers if we allow duplicate attributes.
  • I see no reason for preventing [[X, X]] but allowing [[X]] [[X]] as these variants should be equivalent.
  • Compilers could still warn about duplicated attributes.
  • This unifies the behavior with what’s already been adopted into C.
  • This makes the language more regular.

@jensmaurer jensmaurer moved this from Ready for review to Approved for plenary vote in CWG Apr 12, 2021
@jensmaurer
Copy link
Member

@jensmaurer jensmaurer commented Apr 12, 2021

CWG 2021-04-12: Approved P2156R1 for plenary vote.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
CWG
Approved for plenary vote
Linked pull requests

Successfully merging a pull request may close this issue.

5 participants