[PR c++/84702] ICE with default tmpl arg of overload set
[official-gcc.git] / gcc / testsuite / g++.dg / missing-symbol-2.C
blob4a119f8e9ad0c95c09e843571c8a2bf055b1204f
1 /* { dg-options "-fdiagnostics-show-caret" } */
3 extern int foo (void);
5 void missing_open_paren (void)
7   if foo ()) /* { dg-error "expected '\\(' before 'foo'" } */
8     {
9     }
10   /* { dg-begin-multiline-output "" }
11    if foo ())
12       ^~~
13       (
14      { dg-end-multiline-output "" } */
18 void missing_close_square (void)
20   const char test [42;  /* { dg-error "22: expected ']' before ';' token" } */
21   /* { dg-begin-multiline-output "" }
22    const char test [42;
23                       ^
24                       ]
25      { dg-end-multiline-output "" } */
28 int missing_semicolon (void)
30   return 42 /* { dg-error "expected ';'" } */
32 /* { dg-begin-multiline-output "" }
33    return 42
34             ^
35             ;
36  }
37  ~           
38    { dg-end-multiline-output "" } */
41 int missing_colon_in_switch (int val)
43   switch (val)
44     {
45     case 42 /* { dg-error "expected ':' before 'return'" } */
46       return 42;
47     /* { dg-begin-multiline-output "" }
48      case 42
49             ^
50             :
51        return 42;
52        ~~~~~~
53        { dg-end-multiline-output "" } */
55     default:
56       return val;
57     }