* gcc.dg/predict-12.c: New testcase.
[official-gcc.git] / gcc / testsuite / gcc.dg / cpp / if-paren.c
blob407a302b20ed4e5eb1f2edd3ea7c7065502079e0
1 /* Copyright (C) 2000 Free Software Foundation, Inc. */
3 /* { dg-do preprocess } */
5 /* These now use "!=" rather than "<" to increase chance of failure. */
6 #if 16 * (1) + 4 != 20
7 #error /* { dg-bogus "error" "with paren" } */
8 #endif
10 #if 16 * 1 + 4 != 20
11 #error /* { dg-bogus "error" "without paren" } */
12 #endif
14 #if () /* { dg-error "expression between" "empty paren" } */
15 #endif
17 #if (1) == 1
18 #error /* { dg-error "" "simple parens no. 1" } */
19 #endif
21 #if (2)
22 #error /* { dg-error "" "simple parens no. 2" } */
23 #endif
25 #if 3 == (3)
26 #error /* { dg-error "" "simple parens no. 3" } */
27 #endif
29 #if (((-1) + 8)) == ((+2) * ((3)) - -1)
30 #error /* { dg-error "" "nested parentheses" } */
31 #endif