aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/validation/label-positioning.c
blob: 583661cab1fa0c5f356472993aa90c44701164c3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
extern int someval(void);

static void func (int x)
{
	if (x > someval())
		goto end;
	switch (x) { case 0: }
	switch (x) { case 1 ... 9: }
	switch (x) { default: }
end:
}

/*
 * check-name: label-positioning
 *
 * check-error-start
label-positioning.c:7:30: warning: statement expected after case label
label-positioning.c:8:36: warning: statement expected after case label
label-positioning.c:9:31: warning: statement expected after case label
label-positioning.c:11:1: warning: statement expected after label
 * check-error-end
 */