Mercurial > hg > CbC > CbC_gcc
annotate gcc/testsuite/gcc.dg/Wparentheses-1.c @ 111:04ced10e8804
gcc 7
author | kono |
---|---|
date | Fri, 27 Oct 2017 22:46:09 +0900 |
parents | |
children |
rev | line source |
---|---|
111 | 1 /* Copyright (C) 2001 Free Software Foundation, Inc. */ |
2 | |
3 /* { dg-do compile } */ | |
4 /* { dg-options -Wparentheses } */ | |
5 | |
6 /* Source: Neil Booth, 1 Nov 2001. PR 3170, 3422 - bogus warnings | |
7 about suggesting parentheses. */ | |
8 | |
9 int foo (int a, int b) | |
10 { | |
11 int c = (a && b) || 0; /* { dg-bogus "suggest parentheses" } */ | |
12 c = a && b || 0; /* { dg-warning "suggest parentheses" } */ | |
13 | |
14 return (a && b && 1) || 0; /* { dg-bogus "suggest parentheses" } */ | |
15 } |