8
Statements
[stmt.stmt]
8.2
Label
[stmt.label]
1
#
A label can be added to a statement or used anywhere in a
compound-statement
.
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
The optional
attribute-specifier-seq
appertains to the label
.
The only use of a label with an
identifier
is as the target of a
goto
.
No two labels in a function shall have the same
identifier
.
A label can be used in a
goto
statement before its introduction
.
2
#
Case labels and default labels shall occur only in
switch
statements
.