diff options
| author | Alexander Viro <viro@parcelfarce.linux.theplanet.co.uk> | 2004-09-30 09:17:13 -0700 |
|---|---|---|
| committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-04-07 21:03:26 -0700 |
| commit | dec7c920ee3318080de6d1b739fdb3e29d6059e4 (patch) | |
| tree | 17f4b87f596d528ad79e3a65e12f0fcf43fb6fdf /validation | |
| parent | 3f9dcfb9cc7156a23a62613527e911a653b0305b (diff) | |
| download | sparse-dev-dec7c920ee3318080de6d1b739fdb3e29d6059e4.tar.gz | |
[PATCH] testcase for two-argument ?:
Diffstat (limited to 'validation')
| -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 */ +} |
