File: choose_expr.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 (17 lines) | stat: -rw-r--r-- 670 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
static int x = __builtin_choose_expr(0,(char *)0,(void)0);
static int y = __builtin_choose_expr(1,(char *)0,(void)0);
static char s[42];
static int z = 1/(sizeof(__builtin_choose_expr(1,s,0)) - 42);

/*
 * check-name: choose expr builtin
 * check-error-start
choose_expr.c:1:51: warning: incorrect type in initializer (different base types)
choose_expr.c:1:51:    expected int static [toplevel] x
choose_expr.c:1:51:    got void
choose_expr.c:2:41: warning: incorrect type in initializer (different base types)
choose_expr.c:2:41:    expected int static [toplevel] y
choose_expr.c:2:41:    got char *
choose_expr.c:4:17: warning: division by zero
 * check-error-end
 */