This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
ObjC/ObjC++: Additional test for class extensions
- From: "Nicola Pero" <nicola dot pero at meta-innovation dot com>
- To: "gcc-patches at gnu dot org" <gcc-patches at gnu dot org>
- Date: Fri, 10 Dec 2010 19:07:54 +0100 (CET)
- Subject: ObjC/ObjC++: Additional test for class extensions
This patch adds a test that class extensions produce an error if compiled
with -fobjc-std=objc1. It all works fine, I'd just like to have the test
in the testsuite to make sure it keeps working fine in the future. ;-)
Ok to commit ?
Thanks
PS: the ObjC++ check doesn't work due to testsuite issues - a number of other
checks in the same file don't work either. I'll have to look at that separately.
Index: ChangeLog
===================================================================
--- ChangeLog (revision 167680)
+++ ChangeLog (working copy)
@@ -1,5 +1,11 @@
2010-12-10 Nicola Pero <nicola.pero@meta-innovation.com>
+ * objc.dg/fobjc-std-1.m: Updated to test that class extensions
+ produce an error with -fobjc-std=objc1.
+ * obj-c++.dg/fobjc-std-1.mm: Same change.
+
+2010-12-10 Nicola Pero <nicola.pero@meta-innovation.com>
+
* objc.dg/class-extension-1.m: New.
* objc.dg/class-extension-2.m: New.
* objc.dg/class-extension-3.m: New.
Index: objc.dg/fobjc-std-1.m
===================================================================
--- objc.dg/fobjc-std-1.m (revision 167679)
+++ objc.dg/fobjc-std-1.m (working copy)
@@ -65,3 +65,12 @@
{
return MyRootClass.name; /* { dg-error "not available in Objective.C 1.0" } */
}
+
+@interface MyRootClass3
+{
+ Class isa;
+}
+@end
+
+@interface MyRootClass3 ()
+@end /* { dg-error "not available in Objective.C 1.0" } */
Index: obj-c++.dg/fobjc-std-1.mm
===================================================================
--- obj-c++.dg/fobjc-std-1.mm (revision 167679)
+++ obj-c++.dg/fobjc-std-1.mm (working copy)
@@ -71,3 +71,11 @@
return MyRootClass.name; /* { dg-error "not available in Objective.C 1.0" } */
}
+@interface MyRootClass3
+{
+ Class isa;
+}
+@end
+
+/* There is a problem with the testsuite on the following line; the compiler seems Ok, but the testsuite still barfs. */
+/* @interface MyRootClass3 () */ /* dg-error "not available in Objective.C 1.0" */
+/* @end */