1 /* Test operation of -Wparentheses. Precedence warnings. && inside
3 /* Origin: Joseph Myers <jsm@polyomino.org.uk> */
5 /* { dg-do compile } */
6 /* { dg-options "-Wparentheses" } */
11 bar (int a, int b, int c)
13 foo (a && b || c); /* { dg-warning "parentheses" "correct warning" } */
16 foo (1 && 2 || c); /* { dg-warning "parentheses" "correct warning" } */
19 foo (1 && 2 || 3); /* { dg-warning "parentheses" "correct warning" } */
22 foo (a || b && c); /* { dg-warning "parentheses" "correct warning" } */
25 foo (1 || 2 && c); /* { dg-warning "parentheses" "correct warning" } */
28 foo (1 || 2 && 3); /* { dg-warning "parentheses" "correct warning" } */