Skip to content

Commit 39f6799

Browse files
jensmaurertkoeppe
authored andcommitted
P2156R1 Allow Duplicate Attributes
Also fixes CWG1914.
1 parent 6eb2413 commit 39f6799

File tree

1 file changed

+9
-17
lines changed

1 file changed

+9
-17
lines changed

source/declarations.tex

Lines changed: 9 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -8493,8 +8493,8 @@
84938493

84948494
\pnum
84958495
The \grammarterm{attribute-token} \tcode{carries_dependency} specifies
8496-
dependency propagation into and out of functions. It shall appear at most once
8497-
in each \grammarterm{attribute-list} and no
8496+
dependency propagation into and out of functions.
8497+
No
84988498
\grammarterm{attribute-argument-clause} shall be present. The attribute may be
84998499
applied to the \grammarterm{declarator-id} of a
85008500
\grammarterm{parameter-declaration} in a function declaration or lambda, in
@@ -8580,7 +8580,7 @@
85808580
\tcode{deprecated} is appropriate for names and entities that are deemed obsolescent or
85818581
unsafe.
85828582
\end{note}
8583-
It shall appear at most once in each \grammarterm{attribute-list}. An
8583+
An
85848584
\grammarterm{attribute-argument-clause} may be present and, if present, it shall have the form:
85858585
\begin{ncbnf}
85868586
\terminal{(} string-literal \terminal{)}
@@ -8630,9 +8630,7 @@
86308630
may be applied to a null statement\iref{stmt.expr};
86318631
\indextext{statement!fallthrough}
86328632
such a statement is a fallthrough statement.
8633-
The \grammarterm{attribute-token} \tcode{fallthrough}
8634-
shall appear at most once in each \grammarterm{attribute-list} and
8635-
no \grammarterm{attribute-argument-clause} shall be present.
8633+
No \grammarterm{attribute-argument-clause} shall be present.
86368634
A fallthrough statement may only appear within
86378635
an enclosing \keyword{switch} statement\iref{stmt.switch}.
86388636
The next statement that would be executed after a fallthrough statement
@@ -8692,10 +8690,7 @@
86928690
The \grammarterm{attribute-token}s
86938691
\tcode{likely} and \tcode{unlikely}
86948692
may be applied to labels or statements.
8695-
The \grammarterm{attribute-token}s
8696-
\tcode{likely} and \tcode{unlikely}
8697-
shall appear at most once in each \grammarterm{attribute-list}
8698-
and no \grammarterm{attribute-argument-clause} shall be present.
8693+
No \grammarterm{attribute-argument-clause} shall be present.
86998694
The \grammarterm{attribute-token} \tcode{likely}
87008695
shall not appear in an \grammarterm{attribute-specifier-seq}
87018696
that contains the \grammarterm{attribute-token} \tcode{unlikely}.
@@ -8751,8 +8746,7 @@
87518746
\pnum
87528747
The \grammarterm{attribute-token} \tcode{maybe_unused}
87538748
indicates that a name or entity is possibly intentionally unused.
8754-
It shall appear at most once in each \grammarterm{attribute-list} and
8755-
no \grammarterm{attribute-argument-clause} shall be present.
8749+
No \grammarterm{attribute-argument-clause} shall be present.
87568750

87578751
\pnum
87588752
The attribute may be applied to the declaration of a class,
@@ -8798,7 +8792,6 @@
87988792
The \grammarterm{attribute-token} \tcode{nodiscard}
87998793
may be applied to the \grammarterm{declarator-id}
88008794
in a function declaration or to the declaration of a class or enumeration.
8801-
It shall appear at most once in each \grammarterm{attribute-list}.
88028795
An \grammarterm{attribute-argument-clause} may be present
88038796
and, if present, shall have the form:
88048797

@@ -8887,8 +8880,8 @@
88878880
\indextext{attribute!noreturn}
88888881

88898882
\pnum
8890-
The \grammarterm{attribute-token} \tcode{noreturn} specifies that a function does not return. It
8891-
shall appear at most once in each \grammarterm{attribute-list} and no
8883+
The \grammarterm{attribute-token} \tcode{noreturn} specifies that a function does not return.
8884+
No
88928885
\grammarterm{attribute-argument-clause} shall be present. The attribute may be applied to the
88938886
\grammarterm{declarator-id} in a function declaration. The first declaration of a function shall
88948887
specify the \tcode{noreturn} attribute if any declaration of that function specifies the
@@ -8930,8 +8923,7 @@
89308923
The \grammarterm{attribute-token} \tcode{no_unique_address}
89318924
specifies that a non-static data member
89328925
is a potentially-overlapping subobject\iref{intro.object}.
8933-
It shall appear at most once in each \grammarterm{attribute-list}
8934-
and no \grammarterm{attribute-argument-clause} shall be present.
8926+
No \grammarterm{attribute-argument-clause} shall be present.
89358927
The attribute may appertain to a non-static data member
89368928
other than a bit-field.
89378929

0 commit comments

Comments
 (0)