aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/validation/label-scope2.c
blob: 448647528dc6d5e7ef2b4f8fd14d49403ce0a7be (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
28
29
30
31
static void ok_lvl2(void)
{
	__label__ l;

	{
	l:
		goto l;
	}
}

static void ko_expr2(void)
{
	{
		__label__ a;

		({
a:
			 0;
		});
		goto a;
	}
}

/*
 * check-name: label-scope2
 *
 * check-error-start
label-scope2.c:20:17: error: label 'a' used outside statement expression
label-scope2.c:17:1:    label 'a' defined here
 * check-error-end
 */