aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/validation/label-scope2.c
blob: 8c04ac6525e51b2c13c1b513245acacfbc646c7d (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
32
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-known-to-fail
 *
 * 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
 */