Skip to content

P2156R1 Allow Duplicate Attributes #4664

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

Merged
merged 1 commit into from
Jun 15, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 9 additions & 17 deletions source/declarations.tex
Original file line number Diff line number Diff line change
Expand Up @@ -8493,8 +8493,8 @@

\pnum
The \grammarterm{attribute-token} \tcode{carries_dependency} specifies
dependency propagation into and out of functions. It shall appear at most once
in each \grammarterm{attribute-list} and no
dependency propagation into and out of functions.
No
\grammarterm{attribute-argument-clause} shall be present. The attribute may be
applied to the \grammarterm{declarator-id} of a
\grammarterm{parameter-declaration} in a function declaration or lambda, in
Expand Down Expand Up @@ -8580,7 +8580,7 @@
\tcode{deprecated} is appropriate for names and entities that are deemed obsolescent or
unsafe.
\end{note}
It shall appear at most once in each \grammarterm{attribute-list}. An
An
\grammarterm{attribute-argument-clause} may be present and, if present, it shall have the form:
\begin{ncbnf}
\terminal{(} string-literal \terminal{)}
Expand Down Expand Up @@ -8630,9 +8630,7 @@
may be applied to a null statement\iref{stmt.expr};
\indextext{statement!fallthrough}
such a statement is a fallthrough statement.
The \grammarterm{attribute-token} \tcode{fallthrough}
shall appear at most once in each \grammarterm{attribute-list} and
no \grammarterm{attribute-argument-clause} shall be present.
No \grammarterm{attribute-argument-clause} shall be present.
A fallthrough statement may only appear within
an enclosing \keyword{switch} statement\iref{stmt.switch}.
The next statement that would be executed after a fallthrough statement
Expand Down Expand Up @@ -8692,10 +8690,7 @@
The \grammarterm{attribute-token}s
\tcode{likely} and \tcode{unlikely}
may be applied to labels or statements.
The \grammarterm{attribute-token}s
\tcode{likely} and \tcode{unlikely}
shall appear at most once in each \grammarterm{attribute-list}
and no \grammarterm{attribute-argument-clause} shall be present.
No \grammarterm{attribute-argument-clause} shall be present.
The \grammarterm{attribute-token} \tcode{likely}
shall not appear in an \grammarterm{attribute-specifier-seq}
that contains the \grammarterm{attribute-token} \tcode{unlikely}.
Expand Down Expand Up @@ -8751,8 +8746,7 @@
\pnum
The \grammarterm{attribute-token} \tcode{maybe_unused}
indicates that a name or entity is possibly intentionally unused.
It shall appear at most once in each \grammarterm{attribute-list} and
no \grammarterm{attribute-argument-clause} shall be present.
No \grammarterm{attribute-argument-clause} shall be present.

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

Expand Down Expand Up @@ -8887,8 +8880,8 @@
\indextext{attribute!noreturn}

\pnum
The \grammarterm{attribute-token} \tcode{noreturn} specifies that a function does not return. It
shall appear at most once in each \grammarterm{attribute-list} and no
The \grammarterm{attribute-token} \tcode{noreturn} specifies that a function does not return.
No
\grammarterm{attribute-argument-clause} shall be present. The attribute may be applied to the
\grammarterm{declarator-id} in a function declaration. The first declaration of a function shall
specify the \tcode{noreturn} attribute if any declaration of that function specifies the
Expand Down Expand Up @@ -8930,8 +8923,7 @@
The \grammarterm{attribute-token} \tcode{no_unique_address}
specifies that a non-static data member
is a potentially-overlapping subobject\iref{intro.object}.
It shall appear at most once in each \grammarterm{attribute-list}
and no \grammarterm{attribute-argument-clause} shall be present.
No \grammarterm{attribute-argument-clause} shall be present.
The attribute may appertain to a non-static data member
other than a bit-field.

Expand Down