gcc/testsuite/obj-c++.dg/syntax-error-2.mm
raw| 1 | /* Recover gracefully from a syntax error. */ |
| 2 | // { dg-additional-options "-Wno-objc-root-class" } |
| 3 | |
| 4 | @implementation Whatever /* { dg-warning "cannot find interface declaration for .Whatever." } */ |
| 5 | |
| 6 | - (void) function |
| 7 | { |
| 8 | if( 1 ) |
| 9 | { |
| 10 | else /* { dg-error "expected .\}. before .else." } */ |
| 11 | { |
| 12 | } |
| 13 | } |
| 14 | |
| 15 | - (void) another {} |
| 16 | |
| 17 | @end |