smatch: relicense to GPLv2+
[smatch.git] / validation / choose_expr.c
blobf6fd84cf2aa1a19d5a6a618fd601c80148771dec
1 static int x = __builtin_choose_expr(0,(char *)0,(void)0);
2 static int y = __builtin_choose_expr(1,(char *)0,(void)0);
3 static char s[42];
4 static int z = 1/(sizeof(__builtin_choose_expr(1,s,0)) - 42);
6 /*
7 * check-name: choose expr builtin
8 * check-error-start
9 choose_expr.c:1:51: warning: incorrect type in initializer (different base types)
10 choose_expr.c:1:51: expected int static [signed] [toplevel] x
11 choose_expr.c:1:51: got void <noident>
12 choose_expr.c:2:41: warning: incorrect type in initializer (different base types)
13 choose_expr.c:2:41: expected int static [signed] [toplevel] y
14 choose_expr.c:2:41: got char *<noident>
15 choose_expr.c:4:17: warning: division by zero
16 * check-error-end