gcc/testsuite/g++.dg/other/error24.C
raw| 1 | // PR c++/34965 |
| 2 | // { dg-do compile } |
| 3 | // { dg-options "-O" } |
| 4 | |
| 5 | int foo (int); |
| 6 | |
| 7 | void |
| 8 | bar (int i, int j, double k) |
| 9 | { |
| 10 | foo (i && j) (); // { dg-error "\\(\\(?i != 0\\)? \\&\\& \\(?j != 0\\)?\\)" } |
| 11 | foo (!i || !j) (); // { dg-error "function" } |
| 12 | foo (!i == !j) (); // { dg-error "function" } |
| 13 | } |