aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/c-c++-common/pr62199-2.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2015-03-09 19:26:52 +0100
committerJakub Jelinek <jakub@gcc.gnu.org>2015-03-09 19:26:52 +0100
commit01177669b2eabfb1ddb3290c35bc110980b44d62 (patch)
tree2111b63d7da0a0531f8135d1ab1f64662e3887af /gcc/testsuite/c-c++-common/pr62199-2.c
parentee876e59156337667c4945c3346c0c7876f3a98c (diff)
downloadgcc-01177669b2eabfb1ddb3290c35bc110980b44d62.zip
gcc-01177669b2eabfb1ddb3290c35bc110980b44d62.tar.gz
gcc-01177669b2eabfb1ddb3290c35bc110980b44d62.tar.bz2
re PR c/65120 (Wlogical-not-parentheses should not warn about double exclamation !!)
PR c/65120 * c-typeck.c (parser_build_binary_op): Don't warn for !!x == y or !b == y where b is _Bool. * parser.c (cp_parser_binary_expression): Don't warn for !!x == y or !b == y where b is bool. * c-c++-common/pr49706.c: Adjust tests for not warning about !!x == y or !b == y where b is boolean, and add some further tests. * c-c++-common/pr62199-2.c: Likewise. From-SVN: r221284
Diffstat (limited to 'gcc/testsuite/c-c++-common/pr62199-2.c')
-rw-r--r--gcc/testsuite/c-c++-common/pr62199-2.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/gcc/testsuite/c-c++-common/pr62199-2.c b/gcc/testsuite/c-c++-common/pr62199-2.c
index 7647f16..5d25a0a 100644
--- a/gcc/testsuite/c-c++-common/pr62199-2.c
+++ b/gcc/testsuite/c-c++-common/pr62199-2.c
@@ -11,10 +11,10 @@ bool r;
void
foo (bool b)
{
- r = !b == 1; /* { dg-warning "logical not is only applied to the left hand side of comparison" } */
- r = !b != 1; /* { dg-warning "logical not is only applied to the left hand side of comparison" } */
- r = !b > 1; /* { dg-warning "logical not is only applied to the left hand side of comparison" } */
- r = !b >= 1; /* { dg-warning "logical not is only applied to the left hand side of comparison" } */
- r = !b < 1; /* { dg-warning "logical not is only applied to the left hand side of comparison" } */
- r = !b <= 1; /* { dg-warning "logical not is only applied to the left hand side of comparison" } */
+ r = !b == 1; /* { dg-bogus "logical not is only applied to the left hand side of comparison" } */
+ r = !b != 1; /* { dg-bogus "logical not is only applied to the left hand side of comparison" } */
+ r = !b > 1; /* { dg-bogus "logical not is only applied to the left hand side of comparison" } */
+ r = !b >= 1; /* { dg-bogus "logical not is only applied to the left hand side of comparison" } */
+ r = !b < 1; /* { dg-bogus "logical not is only applied to the left hand side of comparison" } */
+ r = !b <= 1; /* { dg-bogus "logical not is only applied to the left hand side of comparison" } */
}