#
A label can be added to a statement or used anywhere in a compound-statement.
label:
attribute-specifier-seq
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
#
A labeled-statement whose label is a case or default label shall be enclosed by ([stmt.pre]) a switch statement ([stmt.switch]).
A control-flow-limited statement is a statement S for which:
  • a case or default label appearing within S shall be associated with a switch statement ([stmt.switch]) within S, and
  • a label declared in S shall only be referred to by a statement ([stmt.goto]) in S.
An identifier label shall not be enclosed by an expansion-statement ([stmt.expand]).

Follow Lee on X/Twitter - Father, Husband, Serial builder creating AI, crypto, games & web tools. We are friends :) AI Will Come To Life!

Check out: eBank.nz (Art Generator) | Netwrck.com (AI Tools) | Text-Generator.io (AI API) | BitBank.nz (Crypto AI) | ReadingTime (Kids Reading) | RewordGame | BigMultiplayerChess | WebFiddle | How.nz | Helix AI Assistant