aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/obj-c++.dg/basic.mm
diff options
context:
space:
mode:
author(no author) <(no author)@138bc75d-0d04-0410-961f-82ee72b054a4>2004-05-13 00:26:22 +0000
committer(no author) <(no author)@138bc75d-0d04-0410-961f-82ee72b054a4>2004-05-13 00:26:22 +0000
commit642b971b14d7107cfe01bf72648ae3b510a2d33c (patch)
treebaf23254fca2fd8d16741acf27572f3219d56c89 /gcc/testsuite/obj-c++.dg/basic.mm
parent59bc598e01e292d67c32b6ae240b4544d4c234ab (diff)
This commit was manufactured by cvs2svn to create tagapple/gcc-1751
'apple-gcc-1751'. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/tags/apple-gcc-1751@81762 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/obj-c++.dg/basic.mm')
-rw-r--r--gcc/testsuite/obj-c++.dg/basic.mm24
1 files changed, 24 insertions, 0 deletions
diff --git a/gcc/testsuite/obj-c++.dg/basic.mm b/gcc/testsuite/obj-c++.dg/basic.mm
new file mode 100644
index 00000000000..6a0de713825
--- /dev/null
+++ b/gcc/testsuite/obj-c++.dg/basic.mm
@@ -0,0 +1,24 @@
+// APPLE LOCAL file Objective-C++
+// A basic sanity check for Objective-C++.
+// { dg-do run }
+
+#include <objc/objc.h>
+#include <objc/Object.h>
+
+#include <iostream>
+
+@interface Greeter : Object
+- (void) greet;
+@end
+
+@implementation Greeter
+- (void) greet { printf ("Hello from Objective-C\n"); }
+@end
+
+int
+main ()
+{
+ std::cout << "Hello from C++\n";
+ Greeter *obj = [Greeter new];
+ [obj greet];
+}