OSDN Git Service

In gcc/testsuite/:
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / obj-c++.dg / syntax-error-1.mm
1 /* Graceful handling of a syntax error.  */
2 /* { dg-do compile } */
3
4 #include <objc/Object.h>
5
6 class foo {
7   public:
8     foo();
9     virtual ~foo();
10 };
11
12
13 extern void NXLog(const char *, ...);
14
15 @interface Test2 : Object {
16 }
17 - (void) foo2;
18 @end
19
20 @implementation Test2
21 - (void) foo2
22   NXLog("Hello, world!"); /* { dg-error "expected .\{. before .NXLog." } */
23 } /* { dg-error "stray .\}. between Objective\\-C\\+\\+ methods" } */
24 @end
25
26 /* { dg-error "expected constructor, destructor, or type conversion before" "" { target *-*-* } 22 } */