Skip to content

[dcl.init] A declarator does not have an initializer. #1616

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
Nov 12, 2017
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
20 changes: 11 additions & 9 deletions source/declarators.tex
Original file line number Diff line number Diff line change
Expand Up @@ -2378,15 +2378,11 @@
\indextext{initialization|(}

\pnum
A declarator can specify an initial value for the
identifier being declared.
The identifier designates a variable being initialized.
The process of initialization described in the
remainder of~\ref{dcl.init}
applies also to initializations
specified by other syntactic contexts, such as the initialization
of function parameters\iref{expr.call} or
the initialization of return values\iref{stmt.return}.
The process of initialization described in this subclause applies to
all initializations regardless of syntactic context, including the
initialization of a function parameter\iref{expr.call}, the
initialization of a return value\iref{stmt.return}, or when an
initializer follows a declarator.

\begin{bnf}
\nontermdef{initializer}\br
Expand Down Expand Up @@ -2441,6 +2437,12 @@
braced-init-list
\end{bnf}

\begin{note}
The rules in this subclause apply even if the grammar permits only
the \grammarterm{brace-or-equal-initializer} form
of \grammarterm{initializer} in a given context.
\end{note}

\pnum
Except for objects declared with the \tcode{constexpr} specifier, for which see~\ref{dcl.constexpr},
an \grammarterm{initializer} in the definition of a variable can consist of
Expand Down