testsuite: Add -Wno-psabi to pr104505.c
[official-gcc.git] / gcc / testsuite / c-c++-common / missing-symbol.c
blobed319d82e54ef16619cd78a63a5797d377875847
1 /* { dg-options "-fdiagnostics-show-caret -Wno-return-type" } */
3 extern int foo (void);
4 extern int bar (void);
6 int missing_close_paren_in_switch (int i)
8 switch (i /* { dg-error "12: expected '\\)' before '.' token" } */
10 /* { dg-begin-multiline-output "" }
11 switch (i
12 ~ ^
16 { dg-end-multiline-output "" } */
18 case 0:
19 return 5;
20 default:
21 return i;
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 "" }
35 && bar ()
40 { dg-end-multiline-output "" } */
41 /* { dg-message "6: to match this '\\('" "" { target *-*-* } start_of_if } */
42 /* { dg-begin-multiline-output "" }
43 if (foo ()
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 "" }
57 return flag ? 42 0;
60 { dg-end-multiline-output "" } */