atomic_inc_dec: improve how inc/dec is recorded in the DB
[smatch.git] / validation / cond_expr.c
blob9b8105c1cd958f1d5ceb2ddac7b012dba253f972
1 /*
2 * Bug in original tree: (real_v ? : x) had been treated as equivalent of
3 * (real_v == 0 ? real_v == 0 : x), which gives the wrong type (and no
4 * warning from the testcase below).
5 */
6 static int x;
7 static double y;
8 int a(void)
10 return ~(y ? : x); /* should warn */
13 * check-name: Two-argument conditional expression types
15 * check-error-start
16 cond_expr.c:10:16: error: incompatible type for operation (~):
17 cond_expr.c:10:16: double
18 * check-error-end