File: label-positioning.c

package info (click to toggle)
sparse 0.6.5~rc1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 5,768 kB
  • sloc: ansic: 46,405; sh: 614; perl: 299; python: 296; makefile: 282
file content (22 lines) | stat: -rw-r--r-- 535 bytes parent folder | download
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
 */