1 // A basic sanity check for Objective-C++.
3 /* { dg-xfail-run-if "Needs OBJC2 ABI" { *-*-darwin* && { lp64 && { ! objc2 } } } { "-fnext-runtime" } { "" } } */
5 #include "../objc-obj-c++-shared/TestsuiteObject.m"
8 @interface Greeter : TestsuiteObject
9 - (void) greet: (const char *)msg;
12 @implementation Greeter
13 - (void) greet: (const char *)msg
14 { std::cout << msg << __VERSION__ << std::endl;}
20 std::cout << "Hello from C++" << __VERSION__ << std::endl;
21 Greeter *obj = [Greeter new];
22 [obj greet: "Hello from Objective-C++"];