Skip to content

Commit dd45de1

Browse files
committed
P2156R1 Allow Duplicate Attributes
Also fixes CWG1914.
1 parent fb3bea8 commit dd45de1

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
@@ -8482,8 +8482,8 @@
84828482

84838483
\pnum
84848484
The \grammarterm{attribute-token} \tcode{carries_dependency} specifies
8485-
dependency propagation into and out of functions. It shall appear at most once
8486-
in each \grammarterm{attribute-list} and no
8485+
dependency propagation into and out of functions.
8486+
No
84878487
\grammarterm{attribute-argument-clause} shall be present. The attribute may be
84888488
applied to the \grammarterm{declarator-id} of a
84898489
\grammarterm{parameter-declaration} in a function declaration or lambda, in
@@ -8569,7 +8569,7 @@
85698569
\tcode{deprecated} is appropriate for names and entities that are deemed obsolescent or
85708570
unsafe.
85718571
\end{note}
8572-
It shall appear at most once in each \grammarterm{attribute-list}. An
8572+
An
85738573
\grammarterm{attribute-argument-clause} may be present and, if present, it shall have the form:
85748574
\begin{ncbnf}
85758575
\terminal{(} string-literal \terminal{)}
@@ -8619,9 +8619,7 @@
86198619
may be applied to a null statement\iref{stmt.expr};
86208620
\indextext{statement!fallthrough}
86218621
such a statement is a fallthrough statement.
8622-
The \grammarterm{attribute-token} \tcode{fallthrough}
8623-
shall appear at most once in each \grammarterm{attribute-list} and
8624-
no \grammarterm{attribute-argument-clause} shall be present.
8622+
No \grammarterm{attribute-argument-clause} shall be present.
86258623
A fallthrough statement may only appear within
86268624
an enclosing \keyword{switch} statement\iref{stmt.switch}.
86278625
The next statement that would be executed after a fallthrough statement
@@ -8681,10 +8679,7 @@
86818679
The \grammarterm{attribute-token}s
86828680
\tcode{likely} and \tcode{unlikely}
86838681
may be applied to labels or statements.
8684-
The \grammarterm{attribute-token}s
8685-
\tcode{likely} and \tcode{unlikely}
8686-
shall appear at most once in each \grammarterm{attribute-list}
8687-
and no \grammarterm{attribute-argument-clause} shall be present.
8682+
No \grammarterm{attribute-argument-clause} shall be present.
86888683
The \grammarterm{attribute-token} \tcode{likely}
86898684
shall not appear in an \grammarterm{attribute-specifier-seq}
86908685
that contains the \grammarterm{attribute-token} \tcode{unlikely}.
@@ -8740,8 +8735,7 @@
87408735
\pnum
87418736
The \grammarterm{attribute-token} \tcode{maybe_unused}
87428737
indicates that a name or entity is possibly intentionally unused.
8743-
It shall appear at most once in each \grammarterm{attribute-list} and
8744-
no \grammarterm{attribute-argument-clause} shall be present.
8738+
No \grammarterm{attribute-argument-clause} shall be present.
87458739

87468740
\pnum
87478741
The attribute may be applied to the declaration of a class,
@@ -8787,7 +8781,6 @@
87878781
The \grammarterm{attribute-token} \tcode{nodiscard}
87888782
may be applied to the \grammarterm{declarator-id}
87898783
in a function declaration or to the declaration of a class or enumeration.
8790-
It shall appear at most once in each \grammarterm{attribute-list}.
87918784
An \grammarterm{attribute-argument-clause} may be present
87928785
and, if present, shall have the form:
87938786

@@ -8876,8 +8869,8 @@
88768869
\indextext{attribute!noreturn}
88778870

88788871
\pnum
8879-
The \grammarterm{attribute-token} \tcode{noreturn} specifies that a function does not return. It
8880-
shall appear at most once in each \grammarterm{attribute-list} and no
8872+
The \grammarterm{attribute-token} \tcode{noreturn} specifies that a function does not return.
8873+
No
88818874
\grammarterm{attribute-argument-clause} shall be present. The attribute may be applied to the
88828875
\grammarterm{declarator-id} in a function declaration. The first declaration of a function shall
88838876
specify the \tcode{noreturn} attribute if any declaration of that function specifies the
@@ -8919,8 +8912,7 @@
89198912
The \grammarterm{attribute-token} \tcode{no_unique_address}
89208913
specifies that a non-static data member
89218914
is a potentially-overlapping subobject\iref{intro.object}.
8922-
It shall appear at most once in each \grammarterm{attribute-list}
8923-
and no \grammarterm{attribute-argument-clause} shall be present.
8915+
No \grammarterm{attribute-argument-clause} shall be present.
89248916
The attribute may appertain to a non-static data member
89258917
other than a bit-field.
89268918

0 commit comments

Comments
 (0)