6.2. Locally Declared Labels

6.2 Locally Declared Labels

GCC allows you to declare local labels in any nested block scope. A local label is just like an ordinary label, but you can only reference it (with a goto statement, or by taking its address) within the block in which it is declared.

A local label declaration looks like this:

__label__ label;

or

__label__ label1, label2, /* ... */;

Local label declarations must come at the beginning of the block, before any ordinary declarations or statements.

The label declaration defines the label name, but does not define the label itself. You must do this in the usual way, with label:, within the statements of the statement expression.

The local label feature is useful for complex macros. If a macro co