Annex A (informative)
Grammar summary
[gram]
A.5
Statements
[gram.stmt]
statement
:
labeled-statement
attribute-specifier-seq
o
p
t
expression-statement
attribute-specifier-seq
o
p
t
compound-statement
attribute-specifier-seq
o
p
t
selection-statement
attribute-specifier-seq
o
p
t
iteration-statement
attribute-specifier-seq
o
p
t
jump-statement
declaration-statement
attribute-specifier-seq
o
p
t
try-block
init-statement
:
expression-statement
simple-declaration
condition
:
expression
attribute-specifier-seq
o
p
t
decl-specifier-seq
declarator
brace-or-equal-initializer
labeled-statement
:
attribute-specifier-seq
o
p
t
identifier
:
statement
attribute-specifier-seq
o
p
t
case
constant-expression
:
statement
attribute-specifier-seq
o
p
t
default
:
statement
expression-statement
:
expression
o
p
t
;
compound-statement
:
{
statement-seq
o
p
t
}
statement-seq
:
statement
statement-seq
statement
selection-statement
:
if
constexpr
o
p
t
(
init-statement
o
p
t
condition
)
statement
if
constexpr
o
p
t
(
init-statement
o
p
t
condition
)
statement
else
statement
switch
(
init-statement
o
p
t
condition
)
statement
iteration-statement
:
while
(
condition
)
statement
do
statement
while
(
expression
)
;
for
(
init-statement
condition
o
p
t
;
expression
o
p
t
)
statement
for
(
init-statement
o
p
t
for-range-declaration
:
for-range-initializer
)
statement
for-range-declaration
:
attribute-specifier-seq
o
p
t
decl-specifier-seq
declarator
attribute-specifier-seq
o
p
t
decl-specifier-seq
ref-qualifier
o
p
t
[
identifier-list
]
for-range-initializer
:
expr-or-braced-init-list
jump-statement
:
break
;
continue
;
return
expr-or-braced-init-list
o
p
t
;
coroutine-return-statement
goto
identifier
;
coroutine-return-statement
:
co_return
expr-or-braced-init-list
o
p
t
;
declaration-statement
:
block-declaration