blob: 9b8105c1cd958f1d5ceb2ddac7b012dba253f972 [file] [log] [blame]
/*
* Bug in original tree: (real_v ? : x) had been treated as equivalent of
* (real_v == 0 ? real_v == 0 : x), which gives the wrong type (and no
* warning from the testcase below).
*/
static int x;
static double y;
int a(void)
{
return ~(y ? : x); /* should warn */
}
/*
* check-name: Two-argument conditional expression types
*
* check-error-start
cond_expr.c:10:16: error: incompatible type for operation (~):
cond_expr.c:10:16: double
* check-error-end
*/