Objective-C [2/3] : Implement Wobjc-root-class [PR77404].
authorIain Sandoe <iain@sandoe.co.uk>
Thu, 12 Nov 2020 13:11:11 +0000 (13:11 +0000)
committerIain Sandoe <iain@sandoe.co.uk>
Fri, 13 Nov 2020 10:40:54 +0000 (10:40 +0000)
Add "Wno-objc-root-class" to tests in the Objective-C suite where
needed.

gcc/testsuite/ChangeLog:

PR objc/77404
* objc.dg/anon-1.m: Add Wno-objc-root-class.
* objc.dg/attributes/class-attribute-1.m: Likewise.
* objc.dg/attributes/class-attribute-2.m: Likewise.
* objc.dg/attributes/class-attribute-3.m: Likewise.
* objc.dg/attributes/method-deprecated-1.m: Likewise.
* objc.dg/attributes/method-deprecated-2.m: Likewise.
* objc.dg/attributes/method-deprecated-3.m: Likewise.
* objc.dg/attributes/method-format-1.m: Likewise.
* objc.dg/attributes/method-nonnull-1.m: Likewise.
* objc.dg/attributes/method-noreturn-1.m: Likewise.
* objc.dg/attributes/method-sentinel-1.m: Likewise.
* objc.dg/attributes/nsobject-01.m: Likewise.
* objc.dg/attributes/objc-exception-1.m: Likewise.
* objc.dg/attributes/parameter-attribute-1.m: Likewise.
* objc.dg/attributes/parameter-attribute-2.m: Likewise.
* objc.dg/attributes/proto-attribute-1.m: Likewise.
* objc.dg/attributes/proto-attribute-2.m: Likewise.
* objc.dg/attributes/proto-attribute-3.m: Likewise.
* objc.dg/attributes/proto-attribute-4.m: Likewise.
* objc.dg/bitfield-2.m: Likewise.
* objc.dg/break-in-ifstmt.m: Likewise.
* objc.dg/class-1.m: Likewise.
* objc.dg/class-extension-1.m: Likewise.
* objc.dg/class-extension-2.m: Likewise.
* objc.dg/class-extension-3.m: Likewise.
* objc.dg/class-extension-4.m: Likewise.
* objc.dg/class-protocol-1.m: Likewise.
* objc.dg/comp-types-7.m: Likewise.
* objc.dg/demangle-1.m: Likewise.
* objc.dg/duplicate-class-1.m: Likewise.
* objc.dg/encode-6-next.m: Likewise.
* objc.dg/encode-6.m: Likewise.
* objc.dg/enhanced-proto-2.m: Likewise.
* objc.dg/exceptions-1.m: Likewise.
* objc.dg/exceptions-3.m: Likewise.
* objc.dg/exceptions-4.m: Likewise.
* objc.dg/exceptions-5.m: Likewise.
* objc.dg/fobjc-std-1.m: Likewise.
* objc.dg/foreach-2.m: Likewise.
* objc.dg/foreach-4.m: Likewise.
* objc.dg/foreach-5.m: Likewise.
* objc.dg/fsyntax-only.m: Likewise.
* objc.dg/gnu-api-2-class-meta.m: Likewise.
* objc.dg/gnu-api-2-class.m: Likewise.
* objc.dg/gnu-api-2-ivar.m: Likewise.
* objc.dg/gnu-api-2-method.m: Likewise.
* objc.dg/gnu-api-2-objc.m: Likewise.
* objc.dg/gnu-api-2-objc_msg_lookup.m: Likewise.
* objc.dg/gnu-api-2-object.m: Likewise.
* objc.dg/gnu-api-2-property.m: Likewise.
* objc.dg/gnu-api-2-protocol.m: Likewise.
* objc.dg/gnu-api-2-resolve-method.m: Likewise.
* objc.dg/gnu-api-2-sel.m: Likewise.
* objc.dg/incomplete-type-1.m: Likewise.
* objc.dg/instancetype-0.m: Likewise.
* objc.dg/invalid-method-2.m: Likewise.
* objc.dg/ivar-invalid-type-1.m: Likewise.
* objc.dg/ivar-problem-1.m: Likewise.
* objc.dg/ivar-scope-1.m: Likewise.
* objc.dg/ivar-scope-2.m: Likewise.
* objc.dg/ivar-scope-4.m: Likewise.
* objc.dg/ivar-visibility-1.m: Likewise.
* objc.dg/ivar-visibility-2.m: Likewise.
* objc.dg/ivar-visibility-3.m: Likewise.
* objc.dg/ivar-visibility-4.m: Likewise.
* objc.dg/local-decl-1.m: Likewise.
* objc.dg/lto/lto.exp: Likewise.
* objc.dg/lto/trivial-1_0.m: Likewise.
* objc.dg/method-1.m: Likewise.
* objc.dg/method-12.m: Likewise.
* objc.dg/method-13.m: Likewise.
* objc.dg/method-14.m: Likewise.
* objc.dg/missing-proto-3.m: Likewise.
* objc.dg/next-runtime-1.m: Likewise.
* objc.dg/objc-foreach-1.m: Likewise.
* objc.dg/objc-foreach-2.m: Likewise.
* objc.dg/objc-foreach-3.m: Likewise.
* objc.dg/objc-nofilename-1.m: Likewise.
* objc.dg/param-1.m: Likewise.
* objc.dg/pch/pch.exp: Likewise.
* objc.dg/plugin/diagnostic-test-expressions-1.m: Likewise.
* objc.dg/pr23709.m: Likewise.
* objc.dg/private-1.m: Likewise.
* objc.dg/private-2.m: Likewise.
* objc.dg/property/property.exp: Likewise.
* objc.dg/proto-hier-1.m: Likewise.
* objc.dg/proto-hier-2.m: Likewise.
* objc.dg/proto-lossage-1.m: Likewise.
* objc.dg/proto-lossage-5.m: Likewise.
* objc.dg/proto-qual-1.m: Likewise.
* objc.dg/protocol-inheritance-1.m: Likewise.
* objc.dg/protocol-inheritance-2.m: Likewise.
* objc.dg/protocol-optional-1.m: Likewise.
* objc.dg/selector-1.m: Likewise.
* objc.dg/selector-2.m: Likewise.
* objc.dg/selector-3.m: Likewise.
* objc.dg/selector-4.m: Likewise.
* objc.dg/shadow-1.m: Likewise.
* objc.dg/shadow-2.m: Likewise.
* objc.dg/special/load-category-1.m: Likewise.
* objc.dg/special/load-category-2.m: Likewise.
* objc.dg/special/load-category-3.m: Likewise.
* objc.dg/special/special.exp: Likewise.
* objc.dg/special/unclaimed-category-1.h: Likewise.
* objc.dg/special/unclaimed-category-1.m: Likewise.
* objc.dg/stabs-1.m: Likewise.
* objc.dg/strings/strings.exp: Likewise.
* objc.dg/stubify-1.m: Likewise.
* objc.dg/stubify-2.m: Likewise.
* objc.dg/super-class-2.m: Likewise.
* objc.dg/super-dealloc-1.m: Likewise.
* objc.dg/super-dealloc-2.m: Likewise.
* objc.dg/sync-3.m: Likewise.
* objc.dg/threedotthree-abi-1.m: Likewise.
* objc.dg/torture/dg-torture.exp: Likewise.
* objc.dg/torture/strings/strings.exp: Likewise.
* objc.dg/try-catch-11.m: Likewise.
* objc.dg/try-catch-12.m: Likewise.
* objc.dg/type-size-2.m: Likewise.
* objc.dg/type-size-3.m: Likewise.
* objc.dg/type-size-4.m: Likewise.
* objc.dg/type-size-5.m: Likewise.
* objc.dg/undeclared-selector.m: Likewise.
* objc.dg/volatile-1.m: Likewise.

124 files changed:
gcc/testsuite/objc.dg/anon-1.m
gcc/testsuite/objc.dg/attributes/class-attribute-1.m
gcc/testsuite/objc.dg/attributes/class-attribute-2.m
gcc/testsuite/objc.dg/attributes/class-attribute-3.m
gcc/testsuite/objc.dg/attributes/method-deprecated-1.m
gcc/testsuite/objc.dg/attributes/method-deprecated-2.m
gcc/testsuite/objc.dg/attributes/method-deprecated-3.m
gcc/testsuite/objc.dg/attributes/method-format-1.m
gcc/testsuite/objc.dg/attributes/method-nonnull-1.m
gcc/testsuite/objc.dg/attributes/method-noreturn-1.m
gcc/testsuite/objc.dg/attributes/method-sentinel-1.m
gcc/testsuite/objc.dg/attributes/nsobject-01.m
gcc/testsuite/objc.dg/attributes/objc-exception-1.m
gcc/testsuite/objc.dg/attributes/parameter-attribute-1.m
gcc/testsuite/objc.dg/attributes/parameter-attribute-2.m
gcc/testsuite/objc.dg/attributes/proto-attribute-1.m
gcc/testsuite/objc.dg/attributes/proto-attribute-2.m
gcc/testsuite/objc.dg/attributes/proto-attribute-3.m
gcc/testsuite/objc.dg/attributes/proto-attribute-4.m
gcc/testsuite/objc.dg/bitfield-2.m
gcc/testsuite/objc.dg/break-in-ifstmt.m
gcc/testsuite/objc.dg/class-1.m
gcc/testsuite/objc.dg/class-extension-1.m
gcc/testsuite/objc.dg/class-extension-2.m
gcc/testsuite/objc.dg/class-extension-3.m
gcc/testsuite/objc.dg/class-extension-4.m
gcc/testsuite/objc.dg/class-protocol-1.m
gcc/testsuite/objc.dg/comp-types-7.m
gcc/testsuite/objc.dg/demangle-1.m
gcc/testsuite/objc.dg/duplicate-class-1.m
gcc/testsuite/objc.dg/encode-6-next.m
gcc/testsuite/objc.dg/encode-6.m
gcc/testsuite/objc.dg/enhanced-proto-2.m
gcc/testsuite/objc.dg/exceptions-1.m
gcc/testsuite/objc.dg/exceptions-3.m
gcc/testsuite/objc.dg/exceptions-4.m
gcc/testsuite/objc.dg/exceptions-5.m
gcc/testsuite/objc.dg/fobjc-std-1.m
gcc/testsuite/objc.dg/foreach-2.m
gcc/testsuite/objc.dg/foreach-4.m
gcc/testsuite/objc.dg/foreach-5.m
gcc/testsuite/objc.dg/fsyntax-only.m
gcc/testsuite/objc.dg/gnu-api-2-class-meta.m
gcc/testsuite/objc.dg/gnu-api-2-class.m
gcc/testsuite/objc.dg/gnu-api-2-ivar.m
gcc/testsuite/objc.dg/gnu-api-2-method.m
gcc/testsuite/objc.dg/gnu-api-2-objc.m
gcc/testsuite/objc.dg/gnu-api-2-objc_msg_lookup.m
gcc/testsuite/objc.dg/gnu-api-2-object.m
gcc/testsuite/objc.dg/gnu-api-2-property.m
gcc/testsuite/objc.dg/gnu-api-2-protocol.m
gcc/testsuite/objc.dg/gnu-api-2-resolve-method.m
gcc/testsuite/objc.dg/gnu-api-2-sel.m
gcc/testsuite/objc.dg/incomplete-type-1.m
gcc/testsuite/objc.dg/instancetype-0.m
gcc/testsuite/objc.dg/invalid-method-2.m
gcc/testsuite/objc.dg/ivar-invalid-type-1.m
gcc/testsuite/objc.dg/ivar-problem-1.m
gcc/testsuite/objc.dg/ivar-scope-1.m
gcc/testsuite/objc.dg/ivar-scope-2.m
gcc/testsuite/objc.dg/ivar-scope-4.m
gcc/testsuite/objc.dg/ivar-visibility-1.m
gcc/testsuite/objc.dg/ivar-visibility-2.m
gcc/testsuite/objc.dg/ivar-visibility-3.m
gcc/testsuite/objc.dg/ivar-visibility-4.m
gcc/testsuite/objc.dg/local-decl-1.m
gcc/testsuite/objc.dg/lto/lto.exp
gcc/testsuite/objc.dg/lto/trivial-1_0.m
gcc/testsuite/objc.dg/method-1.m
gcc/testsuite/objc.dg/method-12.m
gcc/testsuite/objc.dg/method-13.m
gcc/testsuite/objc.dg/method-14.m
gcc/testsuite/objc.dg/missing-proto-3.m
gcc/testsuite/objc.dg/next-runtime-1.m
gcc/testsuite/objc.dg/objc-foreach-1.m
gcc/testsuite/objc.dg/objc-foreach-2.m
gcc/testsuite/objc.dg/objc-foreach-3.m
gcc/testsuite/objc.dg/objc-nofilename-1.m
gcc/testsuite/objc.dg/param-1.m
gcc/testsuite/objc.dg/pch/pch.exp
gcc/testsuite/objc.dg/plugin/diagnostic-test-expressions-1.m
gcc/testsuite/objc.dg/pr23709.m
gcc/testsuite/objc.dg/private-1.m
gcc/testsuite/objc.dg/private-2.m
gcc/testsuite/objc.dg/property/property.exp
gcc/testsuite/objc.dg/proto-hier-1.m
gcc/testsuite/objc.dg/proto-hier-2.m
gcc/testsuite/objc.dg/proto-lossage-1.m
gcc/testsuite/objc.dg/proto-lossage-5.m
gcc/testsuite/objc.dg/proto-qual-1.m
gcc/testsuite/objc.dg/protocol-inheritance-1.m
gcc/testsuite/objc.dg/protocol-inheritance-2.m
gcc/testsuite/objc.dg/protocol-optional-1.m
gcc/testsuite/objc.dg/selector-1.m
gcc/testsuite/objc.dg/selector-2.m
gcc/testsuite/objc.dg/selector-3.m
gcc/testsuite/objc.dg/selector-4.m
gcc/testsuite/objc.dg/shadow-1.m
gcc/testsuite/objc.dg/shadow-2.m
gcc/testsuite/objc.dg/special/load-category-1.m
gcc/testsuite/objc.dg/special/load-category-2.m
gcc/testsuite/objc.dg/special/load-category-3.m
gcc/testsuite/objc.dg/special/special.exp
gcc/testsuite/objc.dg/special/unclaimed-category-1.h
gcc/testsuite/objc.dg/special/unclaimed-category-1.m
gcc/testsuite/objc.dg/stabs-1.m
gcc/testsuite/objc.dg/strings/strings.exp
gcc/testsuite/objc.dg/stubify-1.m
gcc/testsuite/objc.dg/stubify-2.m
gcc/testsuite/objc.dg/super-class-2.m
gcc/testsuite/objc.dg/super-dealloc-1.m
gcc/testsuite/objc.dg/super-dealloc-2.m
gcc/testsuite/objc.dg/sync-3.m
gcc/testsuite/objc.dg/threedotthree-abi-1.m
gcc/testsuite/objc.dg/torture/dg-torture.exp
gcc/testsuite/objc.dg/torture/strings/strings.exp
gcc/testsuite/objc.dg/try-catch-11.m
gcc/testsuite/objc.dg/try-catch-12.m
gcc/testsuite/objc.dg/type-size-2.m
gcc/testsuite/objc.dg/type-size-3.m
gcc/testsuite/objc.dg/type-size-4.m
gcc/testsuite/objc.dg/type-size-5.m
gcc/testsuite/objc.dg/undeclared-selector.m
gcc/testsuite/objc.dg/volatile-1.m

index 5f10f7d60261fd7ce3495cae83c11f785cdcffad..5dab3fa142d6c63a65b65889bb3b13b3b0696c00 100644 (file)
@@ -1,5 +1,6 @@
 /* Test for graceful handling of anonymous ivars.  */
 /* { dg-do compile } */
+/* { dg-additional-options "-Wno-objc-root-class" } */
 
 @interface Foo {
    unsigned char : 1;
index 3444760bc3d32db7e82545473dbb78e7a6561c8e..93e5d7f40aeb115970e6c44a0f5a2f41abecf00f 100644 (file)
@@ -1,4 +1,5 @@
 /* { dg-do compile } */
+/* { dg-additional-options "-Wno-objc-root-class" } */
 
 /* Test deprecate attribute with an @interface declaration.  */
 
index 2e1bacb3fa01c3b2baab8862be438c022fe12e1d..f8137ffb4c4b064c70c0f94b4fc48674a6a38476 100644 (file)
@@ -1,4 +1,5 @@
 /* { dg-do compile } */
+/* { dg-additional-options "-Wno-objc-root-class" } */
 
 #include <objc/objc.h>
 
index 6cc5d4e268100840eb33f24c9351f0dd208d643f..7c3b3b0e0062b3263ac96d194742be354d26f750 100644 (file)
@@ -1,5 +1,6 @@
 /* Contributed by Nicola Pero <nicola.pero@meta-innovation.com>, December 2010.  */
 /* { dg-do compile } */
+/* { dg-additional-options "-Wno-objc-root-class" } */
 
 /* Test that you get a warning when an unknown class attribute is ignored.  */
 
index 8343856a5c6f1a610997025096744bd863e7d802..68e8373920da272265b203efda549ca87544cf0a 100644 (file)
@@ -1,5 +1,6 @@
 /* Contributed by Nicola Pero <nicola.pero@meta-innovation.com>, October 2010.  */
 /* { dg-do compile } */
+/* { dg-additional-options "-Wno-objc-root-class" } */
 
 #include <objc/objc.h>
 
index 1e5d87f3e632a08aab67aa8eabd0b2091e1a2b99..8fb0e1510d00a7eff181f0c88963cb71d95f3493 100644 (file)
@@ -1,5 +1,6 @@
 /* Contributed by Nicola Pero <nicola.pero@meta-innovation.com>, October 2010.  */
 /* { dg-do compile } */
+/* { dg-additional-options "-Wno-objc-root-class" } */
 
 #include <objc/objc.h>
 
index 5c715a20b683450d7aecb92f1795f087767c9f5b..efa2d349557b4e17f9ccbd93a14730d949508cdc 100644 (file)
@@ -1,5 +1,6 @@
 /* Contributed by Nicola Pero <nicola.pero@meta-innovation.com>, October 2010.  */
 /* { dg-do compile } */
+/* { dg-additional-options "-Wno-objc-root-class" } */
 
 #include <objc/objc.h>
 
index 9ff34f92fb179545b4c97ba0094981c164352ac4..d3bb997b2aaf4190eaf98dda8305b64abc8fb33a 100644 (file)
@@ -1,6 +1,7 @@
 /* Contributed by Nicola Pero <nicola.pero@meta-innovation.com>, October 2010.  */
 /* { dg-do compile } */
 /* { dg-options "-Wall" } */
+/* { dg-additional-options "-Wno-objc-root-class" } */
 
 #include <objc/objc.h>
 #include <stdlib.h>
index fe5f885b2d4617b1a05947714c6bbda39097efa6..a3bfd9bc3c69bfdc325936abfd2e0e5fca8181d3 100644 (file)
@@ -1,6 +1,7 @@
 /* Contributed by Nicola Pero <nicola.pero@meta-innovation.com>, May 2011.  */
 /* { dg-do compile } */
 /* { dg-options "-Wall" } */
+/* { dg-additional-options "-Wno-objc-root-class" } */
 
 #include <objc/objc.h>
 #include <stdlib.h>
index a83048bb7ed73565b4bf1984ac71bbd85ff68b9c..413a0be4b2bdbbb83a26df0128b0120a3656f837 100644 (file)
@@ -1,5 +1,6 @@
 /* Contributed by Nicola Pero <nicola.pero@meta-innovation.com>, October 2010.  */
 /* { dg-do compile } */
+/* { dg-additional-options "-Wno-objc-root-class" } */
 
 #include <objc/objc.h>
 #include <stdlib.h>
index e2abb1e8a1d57cc03c8d336d1c54fe1ddf8aebd2..f89c98121b9dd657cde99d92b21d72c5670c26ba 100644 (file)
@@ -1,6 +1,7 @@
 /* Contributed by Nicola Pero <nicola.pero@meta-innovation.com>, October 2010.  */
 /* { dg-do compile } */
 /* { dg-options "-Wall" } */
+/* { dg-additional-options "-Wno-objc-root-class" } */
 
 #include <objc/objc.h>
 #include <stdlib.h>
index 5b568490391061ca63c91182546fdeca0f4c006e..1f331508a89f79ce1bc10c20b572513ca72f672d 100644 (file)
@@ -1,5 +1,6 @@
 /* Test handling of the NSObject attribute.  */
 /*  { dg-additional-options "-fsyntax-only " } */
+/* { dg-additional-options "-Wno-objc-root-class" } */
 
 typedef struct AnObj * __attribute__ ((NSObject)) AnObjRef;
 typedef struct AnObj * __attribute__ ((__NSObject__)) AnotherObjRef;
index e7f6f856f8fa3c7e952a6e662353731e81624a5e..19e5ade8bcd1754147bb4f5593d5bfd5ddab5995 100644 (file)
@@ -1,5 +1,6 @@
 /* Contributed by Nicola Pero <nicola.pero@meta-innovation.com>, February 2011.  */
 /* { dg-do compile } */
+/* { dg-additional-options "-Wno-objc-root-class" } */
 
 /* Test that the 'objc_exception' attribute is accepted for
    @interfaces, but not for anything else.  */
index 8263df66db972630c51c4e24b74dca4299fbc2ab..d6ebaf227f3b885eeb0be5c6db777bee4d8e8675 100644 (file)
@@ -1,6 +1,7 @@
 /* Test __attribute__((unused)) for an Objective-C method parameter.  */
 /* { dg-do compile } */
 /* { dg-options "-Wunused-parameter" } */
+/* { dg-additional-options "-Wno-objc-root-class" } */
 
 #include <objc/objc.h>
 
index 99c5a308b8cbcf8b6086b2bcb6eca53c47a4f82b..637846d4a089f079ada8b47f2ac6aea74afe1110 100644 (file)
@@ -1,5 +1,6 @@
 /* Test that we get warnings for unrecognized attributes.  */
 /* { dg-do compile } */
+/* { dg-additional-options "-Wno-objc-root-class" } */
 
 #include <objc/objc.h>
 
index a852a7a6c2fd66dbdc2dc63428e39eeab4d50c40..03726dc7bed74c2ed9008ec98041b282ad7104e9 100644 (file)
@@ -1,4 +1,5 @@
 /* { dg-do compile } */
+/* { dg-additional-options "-Wno-objc-root-class" } */
 
 #include <objc/objc.h>
 
index b23b81de20c22ef7b563f0314390164ae5442155..6a73d248ee8f9fc7b9d43ebbb11498358c2dcb9c 100644 (file)
@@ -1,5 +1,6 @@
 /* Contributed by Nicola Pero <nicola.pero@meta-innovation.com>, November 2010.  */
 /* { dg-do compile } */
+/* { dg-additional-options "-Wno-objc-root-class" } */
 
 /* Test deprecate attribute with a forward declarations of
    @protocol.  */
index 2be286ecfb70026fb04605ed0a286c4f3aa57791..ad6d0c804b1bbbd16a9c3218a2cb97fcf5785ab6 100644 (file)
@@ -1,5 +1,6 @@
 /* Contributed by Nicola Pero <nicola.pero@meta-innovation.com>, November 2010.  */
 /* { dg-do compile } */
+/* { dg-additional-options "-Wno-objc-root-class" } */
 
 /* Test deprecate attribute with normal @protocol declarations.  */
 
index 226fd68b3f2a64e26323b66db15a73f19547d31d..8d34ebdcc2fe4c5db20b8eeadb407d463851b4b5 100644 (file)
@@ -1,5 +1,6 @@
 /* Contributed by Nicola Pero <nicola.pero@meta-innovation.com>, December 2010.  */
 /* { dg-do compile } */
+/* { dg-additional-options "-Wno-objc-root-class" } */
 
 /* Test that you get a warning when an unknown protocol attribute is ignored.  */
 
index 7e8147a7008df4f712d95dc819ac3062dc2936a1..b28c81e056955fc1c23c27af3bed23392e562d11 100644 (file)
@@ -4,6 +4,7 @@
 /* { dg-options "-fsigned-char" } */
 /* { dg-do run { target *-*-darwin* } } */
 /* { dg-skip-if "" { *-*-* } { "-fgnu-runtime" } { "" } } */
+/* { dg-additional-options "-Wno-objc-root-class" } */
 
 typedef struct objc_object { struct objc_class *class_pointer; } *id;
 
index 896849472a7183bb5675e8424e548d08bb6e5428..6176832ed1c56e847f047a21b50c5821b911707a 100644 (file)
@@ -1,4 +1,5 @@
 /* { dg-do compile } */
+/* { dg-additional-options "-Wno-objc-root-class" } */
 
 @interface foo
 - (void) test;
index 05049373fa4fcac3c0c15db78ae85f545dce82cc..64383f22d99e20a88036c61e45394845f79544c0 100644 (file)
@@ -1,5 +1,6 @@
 /* Redeclarations of class names.  */
 /* { dg-do compile } */
+/* { dg-additional-options "-Wno-objc-root-class" } */
 
 typedef int foo; /* { dg-line foo_def } */
 
@@ -8,6 +9,9 @@ typedef int foo; /* { dg-line foo_def } */
 
 typedef int bar; /* { dg-line bar_def } */
 
+#if defined(__has_attribute) && __has_attribute(objc_root_class)
+__attribute__((objc_root_class))
+#endif
 @interface bar
 @end  /* { dg-error "redeclared as different kind of symbol" } */
 /* { dg-error "previous declaration of" "" { target *-*-* } bar_def } */
index 5c89a9838cfbd6e1983c4334999bb33d04227877..9d6658a63993196adfe7b6e065d42f7c164c44e7 100644 (file)
@@ -1,5 +1,6 @@
 /* Contributed by Nicola Pero <nicola.pero@meta-innovation.com>, December 2010.  */
 /* { dg-do compile } */
+/* { dg-additional-options "-Wno-objc-root-class" } */
 
 /* This test tests the basic of class extensions.  */
 
index 7f55b601fb3b2ced9e5008394b35f7cba266c992..293facb189f88ddd9fff632c8b3f0ef08b230c03 100644 (file)
@@ -1,5 +1,6 @@
 /* Contributed by Nicola Pero <nicola.pero@meta-innovation.com>, December 2010.  */
 /* { dg-do compile } */
+/* { dg-additional-options "-Wno-objc-root-class" } */
 
 /* This test tests class extensions and protocols.  */
 
index 69e5705396989b4a739eed05f065f61c86664777..51fe5eef08364b3c90b9ac868684054aaed232bb 100644 (file)
@@ -1,5 +1,6 @@
 /* Contributed by Nicola Pero <nicola.pero@meta-innovation.com>, December 2010.  */
 /* { dg-do compile } */
+/* { dg-additional-options "-Wno-objc-root-class" } */
 
 /* This test tests warnings on class extensions.  */
 
index 692a0fcbd0a828f8491793b9e73a07c108d91935..5d367d40bd53503e2a0db334424e1c8721584fd2 100644 (file)
@@ -1,5 +1,6 @@
 /* Contributed by Nicola Pero <nicola.pero@meta-innovation.com>, December 2010.  */
 /* { dg-do compile } */
+/* { dg-additional-options "-Wno-objc-root-class" } */
 
 /* This test tests you can not declare a class extension after the class @implementation.  */
 
index 59c8f827615931211eabd5944bc63c6cbf39987b..34680c2ef3a804b2abf545b2f9890e2df812c837 100644 (file)
@@ -1,6 +1,7 @@
 /* Check Class <protocol> types */
 /* Author: David Ayers <d.ayers@inode.at> */
 /* { dg-do compile } */
+/* { dg-additional-options "-Wno-objc-root-class" } */
 
 #include <objc/objc.h>
 #include "../objc-obj-c++-shared/runtime.h"
index 526934fbb8211a0ea4e2be27278edbe77749d706..6b796f09b296514e22400314ba86b44b752bb4f1 100644 (file)
@@ -1,4 +1,5 @@
 /* { dg-do compile } */
+/* { dg-additional-options "-Wno-objc-root-class" } */
 /* We used to ICE because we removed the cast to List_linked*
    in -[ListIndex_linked next]. */
 
index 42b79a9eb0a48b83cd36fcad4f0d6e7c1bd8fa20..61e79a69976687f0d2d48b7bf8f6cefee4a33c6c 100644 (file)
@@ -1,6 +1,7 @@
 /* Test demangling an Objective-C method.  */
 /* { dg-do run } */
 /* { dg-xfail-run-if "Needs OBJC2 ABI" { *-*-darwin* && { lp64 && { ! objc2 } } } { "-fnext-runtime" } { "" } } */
+/* { dg-additional-options "-Wno-objc-root-class" } */
 
 #include <string.h>
 #include <stdlib.h>
index 30a18ffa5a68503a9991d0a6869adba655b0f670..7992ebf978c5e95c888d5fc7860e873df7d4666a 100644 (file)
@@ -1,5 +1,6 @@
 /* Contributed by Nicola Pero <nicola.pero@meta-innovation.com>, November 2010.  */
 /* { dg-do compile } */
+/* { dg-additional-options "-Wno-objc-root-class" } */
 
 /* Test that a duplicated @implementation for the same class does not
    crash the compiler.  */
index c3d922659aa8d4aaf904adeed2d6aa3db0030f48..18ee15db446c331f29adea644a21cff1753a7917 100644 (file)
@@ -2,6 +2,7 @@
 /* Author: Ziemowit Laski  <zlaski@apple.com>  */
 /* { dg-do compile } */
 /* { dg-skip-if "" { *-*-* } { "-fgnu-runtime" } { "" } } */
+/* { dg-additional-options "-Wno-objc-root-class" } */
 
 struct Cxx {
   const struct Cxx *next;
index 291a41e96a0a783f1055ab8a502aa5c21c360bdb..9e9e4925c5ea1823e3602b52045f4a7bb489b237 100644 (file)
@@ -2,6 +2,7 @@
 /* Author: Ziemowit Laski  <zlaski@apple.com>  */
 /* { dg-do compile } */
 /* { dg-skip-if "" { *-*-* } { "-fnext-runtime" } { "" } } */
+/* { dg-additional-options "-Wno-objc-root-class" } */
 
 struct Cxx {
   const struct Cxx *next;
index c196b5151c9d6bade1f64597b0229f27befbcd4e..ca99445df409f220eb4c661a57c564eb1e0b8839 100644 (file)
@@ -1,5 +1,6 @@
 /* Test use of @optional/@required keywords in @protocol class. */
 /* { dg-do compile } */
+/* { dg-additional-options "-Wno-objc-root-class" } */
 
 @protocol MyProto1 
 @optional
index 0f3b7e8ae14706fbe9e453c61c25629383deddc1..1e861773b9663a5b079cfe3bdcb3f8c3390ceeed 100644 (file)
@@ -1,6 +1,7 @@
 /* Contributed by Nicola Pero <nicola.pero@meta-innovation.com>, November 2010.  */
 /* { dg-options "-fobjc-exceptions" } */
 /* { dg-do compile } */
+/* { dg-additional-options "-Wno-objc-root-class" } */
 
 /* This test checks the syntax @catch (...) which catches any
    exceptions.  At the moment, @catch (...) is identical to @catch (id
index 69a6494e0482f2befe75c3c16f031ae5649cc941..bedaf53ee839761e9dc0dc32ab8d8fdcd10ba492 100644 (file)
@@ -1,6 +1,7 @@
 /* Contributed by Nicola Pero <nicola.pero@meta-innovation.com>, November 2010.  */
 /* { dg-options "-fobjc-exceptions" } */
 /* { dg-do compile } */
+/* { dg-additional-options "-Wno-objc-root-class" } */
 
 /* Test that the compiler is checking the argument of @catch(), and
    produce errors when invalid types are used.  */
index bbdb741f40b55c9c68e721e4c3afeb9b94a4edb3..5d77ffa61d251cf6632d0c901a59703746f61793 100644 (file)
@@ -1,6 +1,7 @@
 /* Contributed by Nicola Pero <nicola.pero@meta-innovation.com>, November 2010.  */
 /* { dg-options "-fobjc-exceptions" } */
 /* { dg-do compile } */
+/* { dg-additional-options "-Wno-objc-root-class" } */
 
 /* Test warnings when parsing syntax errors in @catch().  */
 
index 55ef0f340e69ad0b37dda495c2e0cf8bad59a703..31796bc4c5cd167cf51d82296a901d0fc6ab8872 100644 (file)
@@ -1,6 +1,7 @@
 /* Contributed by Nicola Pero <nicola.pero@meta-innovation.com>, November 2010.  */
 /* { dg-options "-fobjc-exceptions" } */
 /* { dg-do compile } */
+/* { dg-additional-options "-Wno-objc-root-class" } */
 
 /* Test that you can use an unnamed argument with @catch.  This test is the same
    as exceptions-3.m, but with no name for @catch arguments.  */
index 9a15b8af5da93e1fa15edecbd8d5b1f67e5e8d8b..729f65c5ea611f8ace3d4d72e3db56a42cc48f8e 100644 (file)
@@ -1,6 +1,7 @@
 /* Test warnings when using -fobjc-std=objc1.  */
 /* { dg-do compile } */
 /* { dg-options "-fobjc-std=objc1" } */
+/* { dg-additional-options "-Wno-objc-root-class" } */
 
 #include <objc/objc.h>
 
@@ -29,8 +30,8 @@
 @end
 
 __attribute__ ((deprecated))
-@interface MyRootClass2
-{  /* { dg-error "class attributes are not available in Objective.C 1.0" } */
+@interface MyRootClass2 /* { dg-error "class attributes are not available in Objective.C 1.0" } */
+{  
   Class isa;
 }
 @end
index 93bc9028463f4288f71eae74df255260f0d13da9..ccce557482fb99532cf1328c94758780d4ceccbc 100644 (file)
@@ -6,6 +6,7 @@
 /* { dg-xfail-run-if "Needs OBJC2 ABI" { *-*-darwin* && { lp64 && { ! objc2 } } } { "-fnext-runtime" } { "" } } */
 /* { dg-options "-mno-constant-cfstrings" { target *-*-darwin* } } */
 /* { dg-additional-sources "../objc-obj-c++-shared/nsconstantstring-class-impl.m" } */
+/* { dg-additional-options "-Wno-objc-root-class" } */
 
 #include "../objc-obj-c++-shared/TestsuiteObject.m"
 #ifndef __NEXT_RUNTIME__
index faee73b82234d8f3abd2e4957abf1273daee60e2..23656090c3cc22b8f9b9bb041edc4978e4149925 100644 (file)
@@ -6,6 +6,7 @@
 /* { dg-xfail-run-if "Needs OBJC2 ABI" { *-*-darwin* && { lp64 && { ! objc2 } } } { "-fnext-runtime" } { "" } } */
 /* { dg-options "-mno-constant-cfstrings" { target *-*-darwin* } } */
 /* { dg-additional-sources "../objc-obj-c++-shared/nsconstantstring-class-impl.m" } */
+/* { dg-additional-options "-Wno-objc-root-class" } */
 
 #import "../objc-obj-c++-shared/TestsuiteObject.m"
 #ifndef __NEXT_RUNTIME__
index dce26fa3e9395e4769f249384d6ffaf8413e8960..1bcb10b6fafbb87d5614e2a80f0d5c3dbb8cb1ec 100644 (file)
@@ -6,6 +6,7 @@
 /* { dg-xfail-run-if "Needs OBJC2 ABI" { *-*-darwin* && { lp64 && { ! objc2 } } } { "-fnext-runtime" } { "" } } */
 /* { dg-options "-mno-constant-cfstrings" { target *-*-darwin* } } */
 /* { dg-additional-sources "../objc-obj-c++-shared/nsconstantstring-class-impl.m" } */
+/* { dg-additional-options "-Wno-objc-root-class" } */
 
 #import "../objc-obj-c++-shared/TestsuiteObject.m"
 #ifndef __NEXT_RUNTIME__
index 54a879e22c5b54bf4bf2985f4bd3176f5398c32b..70ea8ace43de0816b6be7e21294af15de798d975 100644 (file)
@@ -2,6 +2,9 @@
 /* { dg-do compile } */
 /* { dg-options "-fsyntax-only" } */
 
+#if defined(__has_attribute) && __has_attribute(objc_root_class)
+__attribute__((objc_root_class))
+#endif
 @interface foo
 -(void) my_method:(int) i with:(int) j;
 @end
index 3a85b163c91376151baf4f7c3fb587288033615e..6c1c76a87a31949bb230c4c5d79dc281201a43c5 100644 (file)
@@ -20,6 +20,7 @@
 /* { dg-do run } */
 /* { dg-skip-if "No API#2 pre-Darwin9" { *-*-darwin[5-8]* } { "-fnext-runtime" } { "" } } */
 /* { dg-xfail-run-if "Needs OBJC2 ABI" { *-*-darwin* && { lp64 && { ! objc2 } } } { "-fnext-runtime" } { "" } } */
+/* { dg-additional-options "-Wno-objc-root-class" } */
 /* { dg-additional-options "-DOBJC_OLD_DISPATCH_PROTOTYPES" { target { *-*-darwin* } } } */
 
 /* To get the modern GNU Objective-C Runtime API, you include
@@ -29,9 +30,6 @@
 #include <stdio.h>
 #include <string.h>
 
-#if __has_attribute(objc_root_class)
-__attribute__((objc_root_class))
-#endif
 @interface MyRootClass
 { Class isa; }
 + alloc;
index eade0dcbbfa127354cab489466d78f5af1bff902..d11dae0e6dc16a697d5f4f577c963b5aee96f69f 100644 (file)
@@ -7,6 +7,7 @@
 /* { dg-do run } */
 /* { dg-skip-if "No API#2 pre-Darwin9" { *-*-darwin[5-8]* } { "-fnext-runtime" } { "" } } */
 /* { dg-xfail-run-if "Needs OBJC2 ABI" { *-*-darwin* && { lp64 && { ! objc2 } } } { "-fnext-runtime" } { "" } } */
+/* { dg-additional-options "-Wno-objc-root-class" } */
 /* { dg-additional-options "-DOBJC_OLD_DISPATCH_PROTOTYPES" { target { *-*-darwin* } } } */
 
 /* To get the modern GNU Objective-C Runtime API, you include
index 19ac004e7b1654d047122ce69c16d58cde42f2c0..072d2655bb8badd82512effd11b091716f62002b 100644 (file)
@@ -5,6 +5,7 @@
 /* { dg-do run } */
 /* { dg-skip-if "No API#2 pre-Darwin9" { *-*-darwin[5-8]* } { "-fnext-runtime" } { "" } } */
 /* { dg-xfail-run-if "Needs OBJC2 ABI" { *-*-darwin* && { lp64 && { ! objc2 } } } { "-fnext-runtime" } { "" } } */
+/* { dg-additional-options "-Wno-objc-root-class" } */
 
 /* To get the modern GNU Objective-C Runtime API, you include
    objc/runtime.h.  */
index 0c4fe4f0c5e1e9d12c56970ed2230447570efb4e..ea1da8d138f593bc7cde96fcad3c8d3aa7b34169 100644 (file)
@@ -5,6 +5,7 @@
 /* { dg-do run } */
 /* { dg-skip-if "No API#2 pre-Darwin9" { *-*-darwin[5-8]* } { "-fnext-runtime" } { "" } } */
 /* { dg-xfail-run-if "Needs OBJC2 ABI" { *-*-darwin* && { lp64 && { ! objc2 } } } { "-fnext-runtime" } { "" } } */
+/* { dg-additional-options "-Wno-objc-root-class" } */
 
 /* To get the modern GNU Objective-C Runtime API, you include
    objc/runtime.h.  */
index 1b4ce8e4799350b4a6acc85495b9b59792d661f8..e9ec5d7ab9406d63f2466345a17d2021a8c21398 100644 (file)
@@ -9,6 +9,7 @@
    systems that don't have the V2 APis).  XFAILing the run is not useful
    since it will XPASS on the sub-set that works.  */
 /* { dg-skip-if "Incompatible" { *-*-darwin* } { "-fnext-runtime" } { "" } } */
+/* { dg-additional-options "-Wno-objc-root-class" } */
 
 /* To get the modern GNU Objective-C Runtime API, you include
    objc/runtime.h.  */
index 5751f3fd298b2fc6a49d7e78d99f7317eec4bcf9..d417225cdfb094ad6145db913fd0dc556dfbd3a4 100644 (file)
@@ -5,6 +5,7 @@
 
 /* { dg-do run } */
 /* { dg-skip-if "" { *-*-* } { "-fnext-runtime" } { "" } } */
+/* { dg-additional-options "-Wno-objc-root-class" } */
 
 /* To get the modern GNU Objective-C Runtime API, you include
    objc/runtime.h.  */
index 3d4d444fe27e9edd545ee6c54d83099320c575f3..20c4342d26704a0aff8066150651e7d3a9e3cae7 100644 (file)
@@ -5,6 +5,7 @@
 /* { dg-do run } */
 /* { dg-skip-if "No API#2 pre-Darwin9" { *-*-darwin[5-8]* } { "-fnext-runtime" } { "" } } */
 /* { dg-xfail-run-if "Needs OBJC2 ABI" { *-*-darwin* && { lp64 && { ! objc2 } } } { "-fnext-runtime" } { "" } } */
+/* { dg-additional-options "-Wno-objc-root-class" } */
 
 /* To get the modern GNU Objective-C Runtime API, you include
    objc/runtime.h.  */
index 12c0d8b98e333659eb3113c2a70b76e4af529b01..0ef4d79f9b35a522aa3be36f0f3e866e3f673b71 100644 (file)
@@ -4,6 +4,7 @@
 
 /* { dg-do run } */
 /* { dg-skip-if "No API#2 pre-Darwin9" { *-*-darwin[5-8]* } { "-fnext-runtime" } { "" } } */
+/* { dg-additional-options "-Wno-objc-root-class" } */
 
 /* To get the modern GNU Objective-C Runtime API, you include
    objc/runtime.h.  */
index a34d74ce90dd794776fb5e58d4027d3ed0a7f2f0..682adcd716e9356cadb15740994c1ac51cfd292c 100644 (file)
@@ -5,6 +5,7 @@
 /* { dg-do run } */
 /* { dg-skip-if "No API#2 pre-Darwin9" { *-*-darwin[5-8]* } { "-fnext-runtime" } { "" } } */
 /* { dg-xfail-run-if "Needs OBJC2 ABI" { *-*-darwin* && { lp64 && { ! objc2 } } } { "-fnext-runtime" } { "" } } */
+/* { dg-additional-options "-Wno-objc-root-class" } */
 
 /* To get the modern GNU Objective-C Runtime API, you include
    objc/runtime.h.  */
index a387709908cf7c08ffc66cea0caa9820b9a291e3..6eaa3dd72a3141833ef9ba6fa23b38df85605100 100644 (file)
@@ -5,6 +5,7 @@
 
 /* { dg-do run } */
 /* { dg-skip-if "" { *-*-* } { "-fnext-runtime" } { "" } } */
+/* { dg-additional-options "-Wno-objc-root-class" } */
 
 /* To get the modern GNU Objective-C Runtime API, you include
    objc/runtime.h.  */
index b71fdfab48cbf4e5390d609ef3db719d4f9517f8..bc581bec2f7428345ba249244bc660161a1af5b0 100644 (file)
@@ -4,6 +4,7 @@
 
 /* { dg-do run } */
 /* { dg-skip-if "No API#2 pre-Darwin9" { *-*-darwin[5-8]* } { "-fnext-runtime" } { "" } } */
+/* { dg-additional-options "-Wno-objc-root-class" } */
 
 /* To get the modern GNU Objective-C Runtime API, you include
    objc/runtime.h.  */
index f1e875f9aaea92670f3880362778cb8a8502b234..60d0d8a113310e20c2195646a05fc31446f6af40 100644 (file)
@@ -6,6 +6,9 @@
 enum type1;
 struct type2;
 
+#if defined(__has_attribute) && __has_attribute(objc_root_class)
+__attribute__((objc_root_class))
+#endif
 @interface MyObject
 - (void) method1: (enum type1)argument;
 - (void) method2: (struct type2)argument;
index 32cafdf314c328e58e6560c8d615b8714eabbb68..dc279269d24237d0a14f95edcfc69caf0d2ff566 100644 (file)
@@ -6,6 +6,9 @@
 extern id class_createInstance (id, int);
 extern id class_getSuperclass (id);
 
+#if defined(__has_attribute) && __has_attribute(objc_root_class)
+__attribute__((objc_root_class))
+#endif
 @interface MyObject
 {
   Class isa;
index cb18de957402fffd803e1826b07f5f8e6663f936..0a4bd6390fcdb9f747de3f6dd873f2e18af5b68f 100644 (file)
@@ -3,6 +3,9 @@
 /* Test that using an invalid type in a method declaration produces a
    friendly error without a compiler crash.  */
 
+#if defined(__has_attribute) && __has_attribute(objc_root_class)
+__attribute__((objc_root_class))
+#endif
 @interface MyClass
 @end
 
index 3e7785db86f84413188f71321b52ec93bcaf343e..98bf36e17c9e14a1a115d93d014bf7e057539d6d 100644 (file)
@@ -1,6 +1,9 @@
 /* { dg-do compile } */
 #include <objc/objc.h>
 
+#if defined(__has_attribute) && __has_attribute(objc_root_class)
+__attribute__((objc_root_class))
+#endif
 @interface MyRootClass
 {
   Class isa;
index 4a877680549ace198a06bd69a2d5037e5d2635fc..0d5bb66ea324088d8e4e56b52d380d27e5de65ab 100644 (file)
@@ -10,6 +10,9 @@
 #include <stdlib.h>
 #include <objc/objc.h>
 
+#if defined(__has_attribute) && __has_attribute(objc_root_class)
+__attribute__((objc_root_class))
+#endif
 @interface MyRootClass1
 {
   Class isa;
@@ -36,6 +39,9 @@
 @end
 
 
+#if defined(__has_attribute) && __has_attribute(objc_root_class)
+__attribute__((objc_root_class))
+#endif
 @interface MyRootClass2
 {
   Class isa;
index 34443a442fe0e3dfca7b8d1405922ae20b21e147..64d275b44bd12c29d132cea525c87d5f8c750266 100644 (file)
@@ -3,6 +3,9 @@
 /* { dg-do compile } */
 #include <objc/objc.h>
 
+#if defined(__has_attribute) && __has_attribute(objc_root_class)
+__attribute__((objc_root_class))
+#endif
 @interface MyClass
 {
   int someivar;
index ff795d08d6a352f945b7ac71eb90475acc190d9e..1149d735d127bdb71cb354acbb2284747fe912cb 100644 (file)
@@ -4,6 +4,9 @@
 /* { dg-additional-options "-fno-local-ivars" } */
 #include <objc/objc.h>
 
+#if defined(__has_attribute) && __has_attribute(objc_root_class)
+__attribute__((objc_root_class))
+#endif
 @interface MyClass
 {
   int someivar;
index 5fc29f90bdcb8e258f0c37d3f4c8a08439237166..df1c8927586ef4ede0bdb0a1750ff4b5168ea5be 100644 (file)
@@ -1,7 +1,8 @@
 /* Test instance variable scope.  */
 /* Author: Dimitris Papavasiliou <dpapavas@gmail.com>.  */
 /* { dg-do run } */
-/* { dg-additional-options "-Wno-shadow-ivar -fno-local-ivars" } */
+/* { dg-additional-options "-Wno-shadow-ivar -fno-local-ivars -Wno-objc-root-class" } */
+
 #include "../objc-obj-c++-shared/runtime.h"
 #include <objc/objc.h>
 
index 5a222591d19ab05254a47adf83acf25ad02c5bb9..79d791ec7aba68a94974769bc0d3da3c1b5b2002 100644 (file)
@@ -1,6 +1,7 @@
 /* Test instance variable visibility.  */
 /* Author: Dimitris Papavasiliou <dpapavas@gmail.com>.  */
 /* { dg-do compile } */
+/* { dg-additional-options "-Wno-objc-root-class" } */
 #include <objc/objc.h>
 
 @interface MySuperClass
index eb41c8f4db025e917bbb28de16aa32d7608a6cd9..6ddcb5b46652cc4d9ebc31d8357481da56190029 100644 (file)
@@ -1,7 +1,7 @@
 /* Test instance variable visibility.  */
 /* Author: Dimitris Papavasiliou <dpapavas@gmail.com>.  */
 /* { dg-do compile } */
-/* { dg-additional-options "-fivar-visibility=protected" } */
+/* { dg-additional-options "-fivar-visibility=protected -Wno-objc-root-class" } */
 #include <objc/objc.h>
 
 @interface MySuperClass
index ecc6f99c7605848d9d3a6876784b1ad48011416e..64035037a25dbc6a26d7b712da0daedbb1255f10 100644 (file)
@@ -1,7 +1,7 @@
 /* Test instance variable visibility.  */
 /* Author: Dimitris Papavasiliou <dpapavas@gmail.com>.  */
 /* { dg-do compile } */
-/* { dg-additional-options "-fivar-visibility=private" } */
+/* { dg-additional-options "-fivar-visibility=private -Wno-objc-root-class" } */
 #include <objc/objc.h>
 
 @interface MySuperClass
index adfeb449e55b3bf660887b3ac098f60d6c7cc5b9..abd802b5423d63c912ccbb95e67791cba37fb979 100644 (file)
@@ -1,7 +1,7 @@
 /* Test instance variable visibility.  */
 /* Author: Dimitris Papavasiliou <dpapavas@gmail.com>.  */
 /* { dg-do compile } */
-/* { dg-additional-options "-fivar-visibility=public" } */
+/* { dg-additional-options "-fivar-visibility=public -Wno-objc-root-class" } */
 #include <objc/objc.h>
 
 @interface MySuperClass
index 4a4bfdffe7e5ba63b374bad879001153e6701639..8356a8ca24892fe700ed09421313518c007d7cc3 100644 (file)
@@ -1,6 +1,7 @@
 /* Test for hiding of ivars by local variables.  */
 /* Author: Ziemowit Laski <zlaski@apple.com>.  */
 /* { dg-do compile } */
+/* { dg-additional-options "-Wno-objc-root-class" } */
 
 @interface Sprite {
   int a;
index e563ecbc3c24239d7653e345db38ee96fd47d154..8a362d6728870d7f798da448d5155d80091b3fc0 100644 (file)
@@ -41,10 +41,10 @@ if { ![check_effective_target_lto] } {
 global LTO_OPTIONS
 
 set LTO_OPTIONS [list  \
-  {-O0 -flto -fgnu-runtime}    \
-  {-O2 -flto -fgnu-runtime}    \
-  {-O0 -flto -flto-partition=none -fgnu-runtime}       \
-  {-O2 -flto -flto-partition=none -fgnu-runtime}       \
+  {-O0 -flto -fgnu-runtime -Wno-objc-root-class}       \
+  {-O2 -flto -fgnu-runtime -Wno-objc-root-class }      \
+  {-O0 -flto -flto-partition=none -fgnu-runtime -Wno-objc-root-class}  \
+  {-O2 -flto -flto-partition=none -fgnu-runtime -Wno-objc-root-class}  \
 ]
 
 objc_init
@@ -67,10 +67,10 @@ foreach src $tests {
 # darwin targets can also run code with the NeXT runtime.
 if [istarget "*-*-darwin*" ] {
 set LTO_OPTIONS [list  \
-  {-O0 -flto -fnext-runtime}   \
-  {-O2 -flto -fnext-runtime}   \
-  {-O0 -flto -flto-partition=none -fnext-runtime}      \
-  {-O2 -flto -flto-partition=none -fnext-runtime}      \
+  {-O0 -flto -fnext-runtime -Wno-objc-root-class}      \
+  {-O2 -flto -fnext-runtime -Wno-objc-root-class}      \
+  {-O0 -flto -flto-partition=none -fnext-runtime -Wno-objc-root-class}         \
+  {-O2 -flto -flto-partition=none -fnext-runtime -Wno-objc-root-class} \
 ]
   foreach src $tests {
     # If we're only testing specific files and this isn't one of them, skip it.
index ba1b1aa8b359a8940a74cfc5251958837a5fd1c6..ca07fa4bdb2ae52fa35d33b19d8abd64e6d76ec0 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-lto-do run } */
-/* { dg-skip-if "" { "*-*-darwin*" && lp64 } } */
+
 extern int printf (char *,...) ;
 
 typedef struct objc_class *Class;
@@ -7,7 +7,7 @@ typedef struct objc_class *Class;
 struct objc_class {
     Class isa;
     /* other stuff... */
-}  ;
+};
 
 @interface myRootObject {
 @public
index 194c64fac4e04dcf3c6d92c4d4878d0c9fdfd476..bd23493988ce40a480b73aa47b6b4ac418ea8a83 100644 (file)
@@ -1,5 +1,6 @@
 /* Tests of duplication.  */
 /* { dg-do compile } */
+/* { dg-additional-options "-Wno-objc-root-class" } */
 
 @interface class1
 - (int) meth1;   /* { dg-message "previous declaration" } */
index 411caac111ad283318ec7431a18ce6905a4e8097..b69a84f300bed6457549caca52ee697ca467b918 100644 (file)
@@ -1,5 +1,6 @@
 /* Contributed by Igor Seleznev <selez@mail.ru>.  */
 /* This used to be broken.  */
+/* { dg-additional-options "-Wno-objc-root-class" } */
 
 #include <objc/objc.h>
 
index 592038b9d9364dfd8ace75f5d4400c77ac89dea2..3e0fde5f5bab62ab35de83f80423ea7d1f7d8bee 100644 (file)
@@ -4,6 +4,7 @@
 /* Author: Ziemowit Laski <zlaski@apple.com>.  */
 /* { dg-do run } */
 /* { dg-xfail-run-if "Needs OBJC2 ABI" { *-*-darwin* && { lp64 && { ! objc2 } } } { "-fnext-runtime" } { "" } } */
+/* { dg-additional-options "-Wno-objc-root-class" } */
 
 #include <objc/objc.h>
 #include "../objc-obj-c++-shared/runtime.h"
index 96982254aa9f397d422b1833aabda0cfc2b6dcab..bc3ee12f20b20ffbfb93795182713e07beefd087 100644 (file)
@@ -2,6 +2,7 @@
    used as method selectors.  */
 /* Author: Ziemowit Laski <zlaski@apple.com>.  */
 /* { dg-do compile } */
+/* { dg-additional-options "-Wno-objc-root-class" } */
 
 @interface Foo
 - (void)insertNewButtonImage:(Foo *)newButtonImage in:(Foo *)buttonCell;
index 05e1a258183c9a8df6e3ce0d354917d4a726c9fd..77aa3a39446b3a9d2d06df21700609e8a7532f1f 100644 (file)
@@ -2,7 +2,8 @@
    In addition to not crashing :-), the compiler should properly handle
    valid protocol references, even when they're mixed with invalid ones.  */
 /* { dg-do compile } */
+/* { dg-additional-options "-Wno-objc-root-class" } */
+
 #include <objc/objc.h>
 
 @protocol DefinedProtocol
index c76b6166d2ef954cf954eb19ba5bd9e5e4f06a7e..2ce798bc94f2b029970d66d76d1de9965f70af66 100644 (file)
@@ -7,6 +7,7 @@
 /* { dg-skip-if "" { *-*-* } { "-fgnu-runtime" } { "" } } */
 /* { dg-skip-if "" { *-*-* } { "-fobjc-abi-version=1" } { "" } } */
 /* { dg-options "-fobjc-abi-version=0" { target { *-*-darwin* && { ! lp64 } } } } */
+/* { dg-additional-options "-Wno-objc-root-class" } */
 
 @interface FooBar
 - (void)boo;
index 81f5dae0c2f292ee9171e73643ca32d58566be17..e4c958ced72b3213074d365e304e3be238eb54dc 100644 (file)
@@ -1,5 +1,6 @@
 /* Syntax check for the new foreach statement. */
 /* { dg-do compile } */
+/* { dg-additional-options "-Wno-objc-root-class" } */
 
 typedef struct objc_class *Class;
 
index a01f004fec6cf7262867c533beb622200fa3b8c4..0f79089f278471404d4600c7cda367ffe55a9c73 100644 (file)
@@ -1,5 +1,6 @@
 /* Syntax check for the new foreach statement. */
 /* { dg-do compile } */
+/* { dg-additional-options "-Wno-objc-root-class" } */
 
 typedef struct objc_class *Class;
 
index 922db39e7481e8b6a20d7e23ae2e32ad8fb8a465..b551ae394361efae2ab206b412ae722db3696184 100644 (file)
@@ -1,6 +1,7 @@
 /* Syntax check for the new foreach statement. 
    Use of declaration in loop-header without requiring c99 mode. */
 /* { dg-do compile } */
+/* { dg-additional-options "-Wno-objc-root-class" } */
 
 typedef struct objc_class *Class;
 
index 21e0c53b70e9c8f9330c48bf6443f33ec1d864c3..3ddaa6431ec0b1dd21d018fde8c73a90932e10a7 100644 (file)
@@ -1,5 +1,6 @@
 /* Test to make sure that file name does not appear in the binary. */
 /* { dg-do compile { target *-*-darwin* } } */
+/* { dg-additional-options "-Wno-objc-root-class" } */
 
 #include <objc/objc.h>
 
index 9dbf6e3fcd94935de805a6f753fac205b0fffe32..8e7781169acba499b09848aa51c3fe3dc53e0ba6 100644 (file)
@@ -1,6 +1,7 @@
 /* Test if compiler detects object as an parameter to a method
    or not. It is not valid.  */
 /* { dg-do compile } */
+/* { dg-additional-options "-Wno-objc-root-class" } */
 
 @interface foo
 @end
index 2da3d96d4fe31ce93ee8ad4d4ccb81acd98095e1..54c3e429efed301214eae36d463661f381fa7e53 100644 (file)
@@ -41,7 +41,7 @@ foreach test [lsort [glob -nocomplain $srcdir/$subdir/*.m]] {
     # unlikely to make any difference to PCH.  However, we do want to
     # add -O0 -g, since users who want PCH usually want debugging and quick
     # compiles.
-    dg-flags-pch $subdir $test "-fgnu-runtime" $mytorture ".h"
+    dg-flags-pch $subdir $test "-fgnu-runtime -Wno-objc-root-class" $mytorture ".h"
 }
 
 if [istarget "*-*-darwin*" ] {
@@ -52,7 +52,7 @@ if [istarget "*-*-darwin*" ] {
     # unlikely to make any difference to PCH.  However, we do want to
     # add -O0 -g, since users who want PCH usually want debugging and quick
     # compiles.
-    dg-flags-pch $subdir $test "-fnext-runtime" $mytorture ".h"
+    dg-flags-pch $subdir $test "-fnext-runtime -Wno-objc-root-class" $mytorture ".h"
   }
 }
 
index 23a93021e839a7a2f119c193ea79d0ff8f874daa..7070b37b38c776f22cf06c8ddfb569eeb2064f23 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "-O -fdiagnostics-show-caret" } */
+/* { dg-options "-O -fdiagnostics-show-caret -Wno-objc-root-class" } */
 
 /* This file is similar to diagnostic-test-expressions-1.c
    (see the notes in that file); this file adds test
index 7ff9b60523980776cffbdd6c4b54789cbf5d375f..2bdcca56d364f350c789facb3dcde4baf3c98bac 100644 (file)
@@ -1,4 +1,5 @@
 /* { dg-do compile } */
+/* { dg-additional-options "-Wno-objc-root-class" } */
 
 @interface A
 +(void)method: (int)parameter {} /* { dg-error "expected" } */
index 7540fc5800c57da269a811f45ba775f2d4d5dffe..5bd29e5939b1c30ffc87d2f2b426e5a1e1b2ed69 100644 (file)
@@ -1,6 +1,7 @@
 /* Test errors for accessing @private and @protected variables.  */
 /* Author: Nicola Pero <nicola@brainstorm.co.uk>.  */
 /* { dg-do compile } */
+/* { dg-additional-options "-Wno-objc-root-class" } */
 #include <objc/objc.h>
 
 @interface MySuperClass
index eff376a0c84bbbc396442ccc047ee7fddb4a8974..d0646f5ca68fcb245d388e250f36f123c23e9295 100644 (file)
@@ -1,6 +1,7 @@
 /* Test warnings for shadowing instance variables.  */
 /* Author: Nicola Pero <nicola@brainstorm.co.uk>.  */
 /* { dg-do compile } */
+/* { dg-additional-options "-Wno-objc-root-class" } */
 #include <objc/objc.h>
 
 @interface MySuperClass
index 47ffcdf27db8c5c7c9edfa0120589fc7b70b0307..1c203dbcbf0a85dc189bb871cfb96903aa00fff9 100644 (file)
@@ -31,12 +31,12 @@ dg-init
 set tests [lsort [glob -nocomplain $srcdir/$subdir/*.m]]
 
 # Main loop.
-dg-runtest $tests "-fgnu-runtime" $DEFAULT_CFLAGS
+dg-runtest $tests "-fgnu-runtime -Wno-objc-root-class" $DEFAULT_CFLAGS
 
 # Darwin targets can also run code with the NeXT runtime.
 # but Properties are not supported by the runtime lib before Darwin 9.
 if [istarget "*-*-darwin\[9123\]*" ] {
-  dg-runtest $tests "-fnext-runtime" $DEFAULT_CFLAGS
+  dg-runtest $tests "-fnext-runtime -Wno-objc-root-class" $DEFAULT_CFLAGS
 }
 
 # All done.
index 0f409fc69ed488d15006b05f7cfe306bb31b34b5..648a4d45cc3949b7bc398e00f901329995ac7bb6 100644 (file)
@@ -1,6 +1,7 @@
 /* Test for handling of protocol hierarchies.  */
 /* Author: Ziemowit Laski <zlaski@apple.com>.  */
 /* { dg-do compile } */
+/* { dg-additional-options "-Wno-objc-root-class" } */
 
 /* One-line substitute for objc/objc.h */
 typedef struct objc_object { struct objc_class *class_pointer; } *id;
index 819cf4a5089b15b117580fa6e918dfa8a444f99b..6b3f803d5cba56947e2289a472a5fd44acd72792 100644 (file)
@@ -1,6 +1,7 @@
 /* Test protocol warning.  */
 /* Contributed by Devang Patel <dpatel@apple.com>.  */
 /* { dg-do compile } */
+/* { dg-additional-options "-Wno-objc-root-class" } */
 
 typedef struct objc_object { struct objc_class *class_pointer; } *id;
 
index 2f7eb9861400dd2d08f18044f0735d39096828a8..4564a9432f1207035fbfdd1680e70fd403829ba9 100644 (file)
@@ -2,6 +2,7 @@
    may be lost, leading to superfluous warnings.  */
 /* Author: Ziemowit Laski <zlaski@apple.com>.  */
 /* { dg-do compile } */
+/* { dg-additional-options "-Wno-objc-root-class" } */
 
 /* One-line substitute for objc/objc.h */
 typedef struct objc_object { struct objc_class *class_pointer; } *id;
index 35c0956ed8ecfcc7372d4d281b5569ef44787961..a18b3578cbce38dab51fc45f3ee52bfeff25e0fc 100644 (file)
@@ -1,5 +1,6 @@
 /* Do not lose references to forward-declared protocols.  */
 /* { dg-do compile } */
+/* { dg-additional-options "-Wno-objc-root-class" } */
 @class MyBaseClass;
 @class MyClassThatFails;
 @protocol _MyProtocol;
index 40eb0f9f5c5a544ab7b8a63b0a15cb9f513b8c8e..6e908727678a3770188528761ae39d95f133ad5c 100644 (file)
@@ -3,6 +3,7 @@
 
 /* { dg-do run } */
 /* { dg-xfail-run-if "Needs OBJC2 ABI" { *-*-darwin* && { lp64 && { ! objc2 } } } { "-fnext-runtime" } { "" } } */
+/* { dg-additional-options "-Wno-objc-root-class" } */
 
 #include "../objc-obj-c++-shared/runtime.h"
 #include <objc/Protocol.h>
index 5241b29abbd404045d7704de083f0e8ccad3a598..5367a9870be6e964fd82b7578e3beae3ca0f2ae5 100644 (file)
@@ -1,6 +1,7 @@
 /* Contributed by Nicola Pero <nicola.pero@meta-innovation.com>, November 2010.  */
 /* { dg-do compile } */
 /* { dg-options "-Wno-protocol" } */
+/* { dg-additional-options "-Wno-objc-root-class" } */
 
 #include <objc/objc.h>
 
index 74c9174b5de71d6210ee17a252a89472a15ff973..9776a40f1da666bd7f38812283629e647f58cc89 100644 (file)
@@ -1,5 +1,6 @@
 /* Contributed by Nicola Pero <nicola.pero@meta-innovation.com>, November 2010.  */
 /* { dg-do compile } */
+/* { dg-additional-options "-Wno-objc-root-class" } */
 
 #include <objc/objc.h>
 
index bc4a3d07e978081000dcb89328bcf2bbda1c256c..29fe72ea00ff5cc5697f88561736d4d7bb58b23b 100644 (file)
@@ -1,5 +1,6 @@
 /* Contributed by Nicola Pero <nicola.pero@meta-innovation.com>, November 2010.  */
 /* { dg-do compile } */
+/* { dg-additional-options "-Wno-objc-root-class" } */
 
 #include <objc/objc.h>
 
index f0781b68c63ff91365a52ec8429dd3bb9692b6d7..5ff15a2e0a7291e1547dfcca8da249cb7633a369 100644 (file)
@@ -3,6 +3,7 @@
 /* { dg-options "-Wselector" } */
 /* { dg-do compile } */
 /* { dg-skip-if "" { *-*-* } { "-fgnu-runtime" } { "" } } */
+/* { dg-additional-options "-Wno-objc-root-class" } */
 
 typedef struct objc_object { struct objc_class *class_pointer; } *id;
 typedef struct objc_selector    *SEL;
index 6cad2ffb092e29efcfd2232f07dbd68b7c74787c..5042104ed3eddecd523dfc27d49aa8fd58360183 100644 (file)
@@ -1,6 +1,7 @@
 /* Test that we don't ICE when issuing a -Wselector warning.  */
 /* { dg-options "-Wselector" } */
 /* { dg-do compile } */
+/* { dg-additional-options "-Wno-objc-root-class" } */
 
 #include <objc/objc.h>
 
index c0c5f3d8fba788c2281279ad19c65c5931859805..94838cd3803bf126265a434943cdee95fff35025 100644 (file)
@@ -3,6 +3,7 @@
 /* { dg-options "-Wselector" } */
 /* { dg-do compile } */
 /* { dg-skip-if "" { *-*-* } { "-fnext-runtime" } { "" } } */
+/* { dg-additional-options "-Wno-objc-root-class" } */
 
 typedef struct objc_object { struct objc_class *class_pointer; } *id;
 typedef const struct objc_selector    *SEL;
index d34f8c89cd6f4f9d39b5651f920df88e3f03cf4e..2a4947e322a1c656db563ede01e4a3855017a4a5 100644 (file)
@@ -3,6 +3,7 @@
 /* Author: Ziemowit Laski <zlaski@apple.com>.  */
 
 /* { dg-do compile } */
+/* { dg-additional-options "-Wno-objc-root-class" } */
 
 @interface Int1 
 + (int)and_eq:(int)arg1 and:(int)arg2;
index 739a0d0312e7fd21eef033f51a4211ceb8978e84..d18fd6e5f93c4db5909f83e255daca5e8b47370f 100644 (file)
@@ -2,6 +2,7 @@
 /* Author: Dimitris Papavasiliou <dpapavas@gmail.com>.  */
 /* { dg-do compile } */
 /* { dg-additional-options "-Wno-shadow-ivar" } */
+/* { dg-additional-options "-Wno-objc-root-class" } */
 #include <objc/objc.h>
 
 @interface MyClass
index 16261b94a2178ff4d4f15aaa19e9409000893cd7..26447fe10818295c7b0a2747890f7df59b8ace6c 100644 (file)
@@ -2,6 +2,7 @@
 /* Author: Dimitris Papavasiliou <dpapavas@gmail.com>.  */
 /* { dg-do compile } */
 /* { dg-additional-options "-Wno-shadow" } */
+/* { dg-additional-options "-Wno-objc-root-class" } */
 #include <objc/objc.h>
 
 @interface MyClass
index cb221436f02eda03d2d34b3ac388f9ecbfe9b407..b72d0709044eb5f0585679b6aef0d6be99bbcd15 100644 (file)
@@ -1,6 +1,7 @@
 /* Contributed by Nicola Pero <nicola.pero@meta-innovation.com>, December 2010.  */
 /* { dg-do run } */
 /* { dg-xfail-run-if "Needs OBJC2 ABI" { *-*-darwin* && { lp64 && { ! objc2 } } } { "-fnext-runtime" } { "" } } */
+/* { dg-additional-options "-Wno-objc-root-class" } */
 
 #include <stdlib.h>
 #include <objc/objc.h>
index 7dc74595206e81a7fd23ad12dd90c46930a6608d..2706351da2230f75567b790b2715e4d14875778a 100644 (file)
@@ -1,6 +1,7 @@
 /* Contributed by Nicola Pero <nicola.pero@meta-innovation.com>, December 2010.  */
 /* { dg-do run } */
 /* { dg-xfail-run-if "Needs OBJC2 ABI" { *-*-darwin* && { lp64 && { ! objc2 } } } { "-fnext-runtime" } { "" } } */
+/* { dg-additional-options "-Wno-objc-root-class" } */
 
 #include <stdio.h>
 #include <stdlib.h>
index b89d8f15286034f06fb35c38c1139ca04dcf1bef..215e463fcbe1b1130e943f9f750574fc73fa9fbd 100644 (file)
@@ -1,6 +1,7 @@
 /* Contributed by Nicola Pero <nicola.pero@meta-innovation.com>, December 2010.  */
 /* { dg-do run } */
 /* { dg-xfail-run-if "Needs OBJC2 ABI" { *-*-darwin* && { lp64 && { ! objc2 } } } { "-fnext-runtime" } { "" } } */
+/* { dg-additional-options "-Wno-objc-root-class" } */
 
 /* This test is identical to load-category-2, but the classes and
    categories are created in inverted order in the modules, to test
index d770e2accb364f304e81764e4fa68f2d7448d016..f561d3895d493e8a4149e36763888ac2d4aa9536 100644 (file)
@@ -39,6 +39,7 @@ dg-init
 # for all systems we point to the libobjc includes and use the -fgnu-runtime
 set add_flags "additional_flags=-I${srcdir}/../../libobjc"
 lappend add_flags "additional_flags=-fgnu-runtime"
+lappend add_flags "additional_flags=-Wno-objc-root-class"
 set lines [objc_target_compile "$srcdir/$subdir/unclaimed-category-1a.m" "unclaimed-category-1a.o" object $add_flags ]
 if ![string match "" $lines] then {
     fail "unclaimed-category-1a.o"
@@ -50,6 +51,7 @@ if ![string match "" $lines] then {
 if [istarget "*-*-darwin*" ] {
 set add_flags ""
 lappend add_flags "additional_flags=-fnext-runtime"
+lappend add_flags "additional_flags=-Wno-objc-root-class"
 set lines [objc_target_compile "$srcdir/$subdir/unclaimed-category-1a.m" "unclaimed-category-1a.o" object $add_flags ]
 if ![string match "" $lines] then {
     fail "unclaimed-category-1a.o"
@@ -66,6 +68,7 @@ if ![string match "" $lines] then {
 # and load-category-1a.m, link them together, and execute the result.
 set add_flags "additional_flags=-I${srcdir}/../../libobjc"
 lappend add_flags "additional_flags=-fgnu-runtime"
+lappend add_flags "additional_flags=-Wno-objc-root-class"
 set lines [objc_target_compile "$srcdir/$subdir/load-category-1a.m" "load-category-1a.o" object $add_flags ]
 if ![string match "" $lines] then {
     fail "load-category-1a.o"
@@ -77,6 +80,7 @@ if ![string match "" $lines] then {
 if [istarget "*-*-darwin*" ] {
 set add_flags ""
 lappend add_flags "additional_flags=-fnext-runtime"
+lappend add_flags "additional_flags=-Wno-objc-root-class"
 set lines [objc_target_compile "$srcdir/$subdir/load-category-1a.m" "load-category-1a.o" object $add_flags ]
 if ![string match "" $lines] then {
     fail "load-category-1a.o"
@@ -93,6 +97,7 @@ if ![string match "" $lines] then {
 # and load-category-2a.m, link them together, and execute the result.
 set add_flags "additional_flags=-I${srcdir}/../../libobjc"
 lappend add_flags "additional_flags=-fgnu-runtime"
+lappend add_flags "additional_flags=-Wno-objc-root-class"
 set lines [objc_target_compile "$srcdir/$subdir/load-category-2a.m" "load-category-2a.o" object $add_flags ]
 if ![string match "" $lines] then {
     fail "load-category-2a.o"
@@ -104,6 +109,7 @@ if ![string match "" $lines] then {
 if [istarget "*-*-darwin*" ] {
 set add_flags ""
 lappend add_flags "additional_flags=-fnext-runtime"
+lappend add_flags "additional_flags=-Wno-objc-root-class"
 set lines [objc_target_compile "$srcdir/$subdir/load-category-2a.m" "load-category-2a.o" object $add_flags ]
 if ![string match "" $lines] then {
     fail "load-category-2a.o"
@@ -120,6 +126,7 @@ if ![string match "" $lines] then {
 # and load-category-3a.m, link them together, and execute the result.
 set add_flags "additional_flags=-I${srcdir}/../../libobjc"
 lappend add_flags "additional_flags=-fgnu-runtime"
+lappend add_flags "additional_flags=-Wno-objc-root-class"
 set lines [objc_target_compile "$srcdir/$subdir/load-category-3a.m" "load-category-3a.o" object $add_flags ]
 if ![string match "" $lines] then {
     fail "load-category-3a.o"
@@ -131,6 +138,7 @@ if ![string match "" $lines] then {
 if [istarget "*-*-darwin*" ] {
 set add_flags ""
 lappend add_flags "additional_flags=-fnext-runtime"
+lappend add_flags "additional_flags=-Wno-objc-root-class"
 set lines [objc_target_compile "$srcdir/$subdir/load-category-3a.m" "load-category-3a.o" object $add_flags ]
 if ![string match "" $lines] then {
     fail "load-category-3a.o"
index a32024df59f317d8525b7672b9325ccdd966237e..cb5812ea327319c52e7baf92650bdc8d0d446618 100644 (file)
@@ -1,4 +1,5 @@
 /* Contributed by Nicola Pero - Fri Dec 14 08:36:00 GMT 2001 */
+/* { dg-additional-options "-Wno-objc-root-class" } */
 
 /* Test loading unclaimed categories - categories of a class defined
    separately from the class itself.  */
index 7b434b4db54b3ec6eb0457325065bf12fc04da51..a8e422d34e982424a3ad04042a0068790926f600 100644 (file)
@@ -1,6 +1,7 @@
 /* Contributed by Nicola Pero - Fri Dec 14 08:36:00 GMT 2001 */
 /* { dg-do run } */
 /* { dg-xfail-run-if "Needs OBJC2 ABI" { *-*-darwin* && { lp64 && { ! objc2 } } } { "-fnext-runtime" } { "" } } */
+/* { dg-additional-options "-Wno-objc-root-class" } */
 
 #include <objc/objc.h>
 #include "../../objc-obj-c++-shared/runtime.h"
index 452993ed9165172d89972a5496163524ebd2e21e..b97e4d6a762bc038b0e51a6dc3d66f84f031c2da 100644 (file)
@@ -3,6 +3,7 @@
 
 /* { dg-do compile { target stabs } } */
 /* { dg-options "-gstabs" } */
+/* { dg-additional-options "-Wno-objc-root-class" } */
 
 @interface MyClass
 + newWithArg: arg;
index 41da5cb5fc290c671e69e52ee5c640de8f0aa43f..6042d3c14deacee2b6aa162e5659aee008e4af5d 100644 (file)
@@ -35,11 +35,11 @@ dg-init
 set tests [lsort [glob -nocomplain $srcdir/$subdir/*.m]]
 
 # Main loop.
-dg-runtest $tests "-fgnu-runtime" $DEFAULT_CFLAGS
+dg-runtest $tests "-fgnu-runtime -Wno-objc-root-class" $DEFAULT_CFLAGS
 
 # darwin targets can also run code with the NeXT runtime.
 if [istarget "*-*-darwin*" ] {
-  dg-runtest $tests "-fnext-runtime" $DEFAULT_CFLAGS
+  dg-runtest $tests "-fnext-runtime -Wno-objc-root-class" $DEFAULT_CFLAGS
 }
 
 # All done.
index 641595ccfe4c62597b422edc831ca27139999fec..4043492e6b8a2809b97f3de6fc2f189bf5631e7d 100644 (file)
@@ -5,6 +5,7 @@
 /* { dg-skip-if "" { *-*-* } { "-fgnu-runtime" } { "" } } */
 /* { dg-require-effective-target ilp32 } */
 /* { dg-options "-Os -mdynamic-no-pic -mmacosx-version-min=10.4 -msymbol-stubs" } */
+/* { dg-additional-options "-Wno-objc-root-class" } */
 
 typedef struct objc_object { } *id ;
 int x = 41 ;
index 904ac44b2526cd281d1cdebe5f8019a4d80f8f6c..3e9097e11acadea0dc6ea318d77c9c4fb2dbd52d 100644 (file)
@@ -5,6 +5,7 @@
 /* { dg-skip-if "" { *-*-* } { "-fgnu-runtime" } { "" } } */
 /* { dg-require-effective-target ilp32 } */
 /* { dg-options "-mdynamic-no-pic -fdump-rtl-jump -mmacosx-version-min=10.4 -msymbol-stubs" } */
+/* { dg-additional-options "-Wno-objc-root-class" } */
 
 typedef struct objc_object { } *id ;
 int x = 41 ;
index 144ea81b5e68f3870755b2224ddb6104514634a5..63792fd1d88904432b64a7b126e2e23881252ec2 100644 (file)
@@ -1,6 +1,7 @@
 /* Test calling super from within a category class method.  */
 /* Author: Ziemowit Laski <zlaski@apple.com>  */
 /* { dg-do compile } */
+/* { dg-additional-options "-Wno-objc-root-class" } */
 
 typedef struct objc_object { struct objc_class *isa; } *id;
 
index 0ab177bb73c9f0d2e6979279435d71a616626137..035de055b25f3ab35368960768225260da448153 100644 (file)
@@ -2,6 +2,7 @@
 /* Author: Ziemowit Laski <zlaski@apple.com>  */
 
 /* { dg-do compile } */
+/* { dg-additional-options "-Wno-objc-root-class" } */
 
 @interface Foo {
   void *isa;
index 80dcf495062dfaa7ab080a0d79db030019be0523..5d588c50fa96c7cb6270bf70918fff42e9214908 100644 (file)
@@ -2,6 +2,7 @@
 /* Author: Ziemowit Laski <zlaski@apple.com>  */
 
 /* { dg-do compile } */
+/* { dg-additional-options "-Wno-objc-root-class" } */
 
 @interface Foo {
   void *isa;
index 5cee890bba2e7db943b62cabd9412583cc0c5ecb..6ef72a1a4c2135de7ed107894d0cb442f9d728f6 100644 (file)
@@ -1,6 +1,7 @@
 /* Contributed by Nicola Pero <nicola.pero@meta-innovation.com>, December 2010.  */
 /* { dg-options "-fobjc-exceptions" } */
 /* { dg-do compile } */
+/* { dg-additional-options "-Wno-objc-root-class" } */
 
 /* Test that the compiler is checking the argument of @synchronized(),
    and produce errors when invalid types are used.  */
index 53154d321baf7d5d6abc4cd0da7a870715a2c78d..8c22850e094f5fe38d24bc5a73595da98f17acbc 100644 (file)
@@ -3,6 +3,7 @@
 /* { dg-do run { target *-*-darwin* } } */
 /* { dg-require-effective-target ilp32 } */
 /* { dg-skip-if "" { *-*-* } { "-fgnu-runtime" } { "" } } */
+/* { dg-additional-options "-Wno-objc-root-class" } */
 
 #include <stdio.h>
 #include <string.h>
index 28c2359392b3d82e98e6ad838714c5170d17302f..11f50fc1dedb93477b8a0e727bcb4d164d76ffd3 100644 (file)
@@ -7,11 +7,11 @@ dg-init
 # Gather a list of all tests.
 set tests [lsort [glob -nocomplain $srcdir/$subdir/*.m]]
 
-objc-dg-runtest $tests "" "-fgnu-runtime"
+objc-dg-runtest $tests "" "-fgnu-runtime -Wno-objc-root-class"
 
 # darwin targets can also run code with the NeXT runtime.
 if [istarget "*-*-darwin*" ] {
-  objc-dg-runtest $tests "" "-fnext-runtime"
+  objc-dg-runtest $tests "" "-fnext-runtime -Wno-objc-root-class"
 }
 
 dg-finish
index 64e53c6c23f512d2c733d0315ce98af5b23d58fa..3e2b3b0bd03dcf5d14b3514b18dfc1d0d4b28de2 100644 (file)
@@ -24,11 +24,11 @@ dg-init
 # Gather a list of all tests.
 set tests [lsort [glob -nocomplain $srcdir/$subdir/*.m]]
 
-objc-dg-runtest $tests "" "-fgnu-runtime"
+objc-dg-runtest $tests "" "-fgnu-runtime -Wno-objc-root-class"
 
 # Darwin targets also test with the NeXT runtime.
 if [istarget "*-*-darwin*" ] {
-  objc-dg-runtest $tests "" "-fnext-runtime"
+  objc-dg-runtest $tests "" "-fnext-runtime -Wno-objc-root-class"
 }
 
 dg-finish
index e08f321e8c79f077b5b4cbd41a68dd0b2106b1d4..c792c83062f09b95d10e51e096c3a5447b3c6794 100644 (file)
@@ -4,6 +4,7 @@
 
 /* { dg-options "-fobjc-exceptions" } */
 /* { dg-do compile } */
+/* { dg-additional-options "-Wno-objc-root-class" } */
 
 typedef volatile int IOSharedLockData;
 
index ce26b32d32bbce27aacf23618eb7acda6d9a86ec..6c9afc26de7ee42b98b2f5db461cd93df8176874 100644 (file)
@@ -4,6 +4,7 @@
 
 /* { dg-options "-fobjc-exceptions" } */
 /* { dg-do compile } */
+/* { dg-additional-options "-Wno-objc-root-class" } */
 
 @interface TestMyTests
 - (void) testSpoon;
index d02a8af219e14dd37069edc676b3c12d8e4f627f..64444cfe2550fbda006a12a60b0f714d5ad3b2f8 100644 (file)
@@ -4,6 +4,7 @@
 /* Contributed by Ziemowit Laski <zlaski@apple.com>.  */
 /* { dg-do run } */
 /* { dg-xfail-run-if "Needs OBJC2 ABI" { *-*-darwin* && { lp64 && { ! objc2 } } } { "-fnext-runtime" } { "" } } */
+/* { dg-additional-options "-Wno-objc-root-class" } */
 
 #include "../objc-obj-c++-shared/runtime.h"
 #include <stdio.h>
index bc66b0be67a001cd7ffa3e2764efac53c09dd3df..3f65516e75e4506e7a35b8d26c9929588e4fbf79 100644 (file)
@@ -1,6 +1,7 @@
 /* Reject ivars that use flexible array members.  */
 /* Contributed by Nicola Pero  <nicola.pero@meta-innovation.com> */
 /* { dg-do compile } */
+/* { dg-additional-options "-Wno-objc-root-class" } */
 
 typedef struct
 {
index 7e26da34a43de9c8bb67d40cd4322f438c250e2c..f10ed5b0118fefd1c7154b47f71464f0c6cc8fcd 100644 (file)
@@ -2,6 +2,7 @@
 /* Contributed by Nicola Pero  <nicola.pero@meta-innovation.com> */
 /* PR objc/47832 */
 /* { dg-do compile } */
+/* { dg-additional-options "-Wno-objc-root-class" } */
 
 typedef struct
 {
index d89af32b452e41b1eacd95a4088878f7bfd9218c..e1b11f7eef5401692545fee719bbf0bd9bb3b3d9 100644 (file)
@@ -1,6 +1,7 @@
 /* Reject ivars that use flexible array members.  */
 /* Contributed by Nicola Pero  <nicola.pero@meta-innovation.com> */
 /* { dg-do compile } */
+/* { dg-additional-options "-Wno-objc-root-class" } */
 
 typedef struct
 {
index 1cfc6c834812d18a6c0a446357d2552d32aa5fac..389b0321817b2fe16d729a28898c3fd8ee1688b0 100644 (file)
@@ -2,6 +2,7 @@
 /* Author: Nicola Pero <nicola@brainstorm.co.uk>.  */
 /* { dg-do compile } */
 /* { dg-options "-Wundeclared-selector" } */
+/* { dg-additional-options "-Wno-objc-root-class" } */
 
 #include <objc/objc.h>
 
index 8b5381a9874c31fd3022483041ab8281cab86708..a71363163924d05007f388fe77db7a43de4e2efc 100644 (file)
@@ -1,7 +1,8 @@
 /* Test for proper handling of volatile parameters in ObjC methods.  */
+/* Contributed by Ziemowit Laski  <zlaski@apple.com>  */
 /* { dg-do compile } */
 /* { dg-options "-O2" } */
-/* Contributed by Ziemowit Laski  <zlaski@apple.com>  */
+/* { dg-additional-options "-Wno-objc-root-class" } */
 
 @interface Test
 -(void) test2: (volatile int) a;