aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/validation/label-unused.c
blob: e3f255e1b5dec4bd099a5aa1346c3a0f3381b6c9 (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
static void foo(void)
{
l:
	return;
}

static int bar(void)
{
	return  ({
l:
		;
		0;
	});
}

static void baz(void)
{
l: __attribute__((unused));
	return;
}

/*
 * check-name: label-unused
 *
 * check-error-start
label-unused.c:3:1: warning: unused label 'l'
label-unused.c:10:1: warning: unused label 'l'
 * check-error-end
 */