aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/obj-c++.dg/syntax-error-2.mm
blob: bf4d5ffb4a7a5b0fc2ae31c82079bd1dda3ac763 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
/* Recover gracefully from a syntax error.  */
// { dg-additional-options "-Wno-objc-root-class" }

@implementation Whatever  /* { dg-warning "cannot find interface declaration for .Whatever." } */

- (void) function
{
	if( 1 )
	{
	else   /* { dg-error "expected .\}. before .else." } */
	{
	}
}

- (void) another {}

@end