Annex A (informative)
Grammar summary
[gram]
A.6
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
alias-declaration
condition
:
expression
attribute-specifier-seq
o
p
t
decl-specifier-seq
declarator
brace-or-equal-initializer
label
:
attribute-specifier-seq
o
p
t
identifier
:
attribute-specifier-seq
o
p
t
case
constant-expression
:
attribute-specifier-seq
o
p
t
default
:
labeled-statement
:
label
statement
expression-statement
:
expression
o
p
t
;
compound-statement
:
{
statement-seq
o
p
t
label-seq
o
p
t
}
statement-seq
:
statement
statement-seq
statement
label-seq
:
label
label-seq
label
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
if
!
o
p
t
consteval
compound-statement
if
!
o
p
t
consteval
compound-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