diff options
Diffstat (limited to 'validation/cond_expr.c')
| -rw-r--r-- | validation/cond_expr.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/validation/cond_expr.c b/validation/cond_expr.c new file mode 100644 index 00000000..afd35952 --- /dev/null +++ b/validation/cond_expr.c @@ -0,0 +1,11 @@ +/* + * 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). + */ +int x; +double y; +int a(void) +{ + return ~(y ? : x); /* should warn */ +} |
