aboutsummaryrefslogtreecommitdiffhomepage
path: root/notes/goto_local_labels.txt
blob: a91cbbec39471650cd438a125b7497cbc9438258 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27

Local goto labels
=================

This can be used to provide scope for goto labels and avoid accidentally
jumping to an unrelated block.

Syntax idea (borrowed from the GCC extension):

    func f()
    {
        {
            label skip
            ...
            goto skip
            ...
          skip:
            ...
        }
        {
            label skip
            ...
            goto skip
            ...
          skip:
            ...
        }
    }