2 /* { dg-xfail-run-if "Needs OBJC2 ABI" { *-*-darwin* && { lp64 && { ! objc2 } } } { "-fnext-runtime" } { "" } } */
4 /* This tests that exceptions work. It used to fail because
5 objc_msgSend was marked with DECL_NOTHROW.
6 If you include objc/Object.h, the problem goes away, because
7 that file includes objc/objc-runtime.h which explicitly prototypes
8 objc_msgSend without 'nothrow'. */
12 #include "../objc-obj-c++-shared/TestsuiteObject.m"
14 // ObjectiveC class header
15 @interface ObjCclass : TestsuiteObject {
29 int main(int argc, char *argv[])
31 ObjCclass * foo = [[ObjCclass alloc] init];
37 // ObjectiveC implementation
38 @implementation ObjCclass
60 void CPPclass::function1()
63 /* Shouldn't be here because we threw. */