gcc/testsuite/g++.dg/diagnostic/unclosed-extern-c.C
raw| 1 | extern "C" { // { dg-line open_extern_c } |
| 2 | |
| 3 | int foo (void); |
| 4 | |
| 5 | /* Missing close-brace for the extern "C" here. */ |
| 6 | |
| 7 | template <typename T> // { dg-error "template with C linkage" } |
| 8 | void bar (void); |
| 9 | // { dg-message "1: 'extern .C.' linkage started here" "" { target *-*-* } open_extern_c } |
| 10 | |
| 11 | void test (void); |
| 12 | // { dg-message "12: to match this '.'" "" { target *-*-* } open_extern_c } |
| 13 | /* { dg-error "18:expected '.' at end of input" "" { target *-*-* } .-2 } */ |