public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* ObjC/ObjC++: Additional test for class extensions
@ 2010-12-10 18:57 Nicola Pero
  2010-12-10 20:28 ` Mike Stump
  0 siblings, 1 reply; 2+ messages in thread
From: Nicola Pero @ 2010-12-10 18:57 UTC (permalink / raw)
  To: gcc-patches

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 */

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: ObjC/ObjC++: Additional test for class extensions
  2010-12-10 18:57 ObjC/ObjC++: Additional test for class extensions Nicola Pero
@ 2010-12-10 20:28 ` Mike Stump
  0 siblings, 0 replies; 2+ messages in thread
From: Mike Stump @ 2010-12-10 20:28 UTC (permalink / raw)
  To: Nicola Pero; +Cc: gcc-patches

On Dec 10, 2010, at 10:07 AM, Nicola Pero wrote:
> 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 ?

Ok.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-12-10 20:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-12-10 18:57 ObjC/ObjC++: Additional test for class extensions Nicola Pero
2010-12-10 20:28 ` Mike Stump

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).