diff options
Diffstat (limited to 'test/Sema/exprs.c')
-rw-r--r-- | test/Sema/exprs.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/test/Sema/exprs.c b/test/Sema/exprs.c index 9d3da90..56a52be 100644 --- a/test/Sema/exprs.c +++ b/test/Sema/exprs.c @@ -145,5 +145,8 @@ void test19() { int test20(int x) { return x && 4; // expected-warning {{use of logical && with constant operand; switch to bitwise & or remove constant}} - return x && sizeof(int) == 4; // no warning. + return x && sizeof(int) == 4; // no warning, RHS is logical op. + + // no warning, this is an idiom for "true" in old C style. + return x && (signed char)1; } |