6.8.1 Labeled statements

Syntax

1

labeled-statement:

identifier : statement

case constant-expression : statement

default : statement

Constraints

2

A case or default label shall appear only in a switch statement. Further constraints on such labels are discussed under the switch statement.

3

Label names shall be unique within a function.

Semantics

4

Any statement may be preceded by a prefix that declares an identifier as a label name. Labels in themselves do not alter the flow of control, which continues unimpeded across them.

Forward References