aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/validation/choose_expr.c
blob: b5d2b4e6fca70366943ffc1012fd444454304b2d (plain)
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
 */