1 /* { dg-options "-fdiagnostics-show-caret -Wno-return-type" } */
6 int missing_close_paren_in_switch (int i
)
8 switch (i
/* { dg-error "12: expected '\\)' before '.' token" } */
10 /* { dg-begin-multiline-output "" }
16 { dg-end-multiline-output "" } */
23 } /* { dg-error "1: expected" } */
24 /* { dg-begin-multiline-output "" }
27 { dg-end-multiline-output "" } */
29 void missing_close_paren_in_if (void)
31 if (foo () /* { dg-line start_of_if } */
32 && bar () /* { dg-error "16: expected '\\)' before '.' token" } */
34 /* { dg-begin-multiline-output "" }
40 { dg-end-multiline-output "" } */
41 /* { dg-message "6: to match this '\\('" "" { target *-*-* } start_of_if } */
42 /* { dg-begin-multiline-output "" }
45 { dg-end-multiline-output "" } */
47 } /* { dg-error "1: expected" } */
48 /* { dg-begin-multiline-output "" }
51 { dg-end-multiline-output "" } */
53 int missing_colon_in_ternary (int flag
)
55 return flag
? 42 0; /* { dg-error "expected ':' before numeric constant" } */
56 /* { dg-begin-multiline-output "" }
60 { dg-end-multiline-output "" } */