Skip to content

[dcl.stc] rearrange wording, turn typedef restriction into note #6477

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
25 changes: 14 additions & 11 deletions source/declarations.tex
Original file line number Diff line number Diff line change
Expand Up @@ -446,20 +446,23 @@
\keyword{mutable}
\end{bnf}

At most one \grammarterm{storage-class-specifier} shall appear in a given
\grammarterm{decl-specifier-seq}, except that \keyword{thread_local} may appear with \keyword{static} or
\keyword{extern}. If \keyword{thread_local} appears in any declaration of
a variable it shall be present in all declarations of that entity. If a
\grammarterm{storage-class-specifier}
appears in a \grammarterm{decl-specifier-seq}, there can be no
\tcode{typedef} specifier in the same \grammarterm{decl-specifier-seq} and
the \grammarterm{init-declarator-list} or \grammarterm{member-declarator-list}
of the declaration shall not be
empty (except for an anonymous union declared in a namespace scope\iref{class.union.anon}). The
\grammarterm{storage-class-specifier} applies to the name declared by each
The \grammarterm{storage-class-specifier} applies to the name declared by each
\grammarterm{init-declarator} in the list and not to any names declared by
other specifiers.
At most one \grammarterm{storage-class-specifier} shall appear in a given
\grammarterm{decl-specifier-seq}, except that
\keyword{thread_local} may appear with \keyword{static} or \keyword{extern}.
If \keyword{thread_local} appears in any declaration of
a variable, it shall be present in all declarations of that entity.
If a \grammarterm{storage-class-specifier}
appears in a \grammarterm{decl-specifier-seq},
the \grammarterm{init-declarator-list} or \grammarterm{member-declarator-list}
of the declaration shall not be empty, except for an anonymous union
declared in a namespace scope\iref{class.union.anon}.
\begin{note}
A \keyword{typedef} specifier cannot appear in a
\grammarterm{decl-specifier-seq} that contains a
\grammarterm{storage-class-specifier}\iref{dcl.typedef}.
See \ref{temp.expl.spec} and \ref{temp.explicit} for restrictions
in explicit specializations and explicit instantiations, respectively.
\end{note}
Expand Down