2018-01-24 Richard Biener <rguenther@suse.de>
[official-gcc.git] / gcc / testsuite / gcc.dg / cpp / if-cexp.c
blob1ebd11929fda0b122306148648ef550b5a3cc759
1 /* { dg-do preprocess } */
3 /* Test the ? : opearator, for precedence and both true and false. */
5 #if 1 ? 1 ? 2 : 0 : 0
6 #error OK /* { dg-error "OK" "nested ? :" } */
7 #endif
9 #if ((0) ? (1) ? (2) : (3) : (4) ? (5): (6)) == 5
10 #error OK /* { dg-error "OK" "nested ? : with parens" } */
11 #endif
13 #if 2: /* { dg-error "':' without" "immediate :" } */
14 #endif