]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Objective-C [3/3] : Implement Wobjc-root-class [PR77404].
authorIain Sandoe <iain@sandoe.co.uk>
Sun, 25 Oct 2020 09:54:21 +0000 (09:54 +0000)
committerIain Sandoe <iain@sandoe.co.uk>
Fri, 13 Nov 2020 10:40:54 +0000 (10:40 +0000)
Add Wno-objc-root-class where needed to the objective-c++
tests.

gcc/testsuite/ChangeLog:

PR objc/77404
* obj-c++.dg/attributes/class-attribute-1.mm:
Add Wno-objc-root-class.
* obj-c++.dg/attributes/class-attribute-2.mm: Likewise.
* obj-c++.dg/attributes/class-attribute-3.mm: Likewise.
* obj-c++.dg/attributes/method-deprecated-1.mm: Likewise.
* obj-c++.dg/attributes/method-deprecated-2.mm: Likewise.
* obj-c++.dg/attributes/method-deprecated-3.mm: Likewise.
* obj-c++.dg/attributes/method-format-1.mm: Likewise.
* obj-c++.dg/attributes/method-nonnull-1.mm: Likewise.
* obj-c++.dg/attributes/method-noreturn-1.mm: Likewise.
* obj-c++.dg/attributes/method-sentinel-1.mm: Likewise.
* obj-c++.dg/attributes/nsobject-01.mm: Likewise.
* obj-c++.dg/attributes/parameter-attribute-1.mm: Likewise.
* obj-c++.dg/attributes/parameter-attribute-2.mm: Likewise.
* obj-c++.dg/attributes/proto-attribute-1.mm: Likewise.
* obj-c++.dg/attributes/proto-attribute-3.mm: Likewise.
* obj-c++.dg/attributes/proto-attribute-4.mm: Likewise.
* obj-c++.dg/attributes/unused-parameter-1.mm: Likewise.
* obj-c++.dg/bad-receiver-type.mm: Likewise.
* obj-c++.dg/bitfield-3.mm: Likewise.
* obj-c++.dg/bitfield-5.mm: Likewise.
* obj-c++.dg/class-extension-1.mm: Likewise.
* obj-c++.dg/class-extension-2.mm: Likewise.
* obj-c++.dg/class-extension-3.mm: Likewise.
* obj-c++.dg/class-extension-4.mm: Likewise.
* obj-c++.dg/class-protocol-1.mm: Likewise.
* obj-c++.dg/comp-types-1.mm: Likewise.
* obj-c++.dg/comp-types-10.mm: Likewise.
* obj-c++.dg/comp-types-2.mm: Likewise.
* obj-c++.dg/comp-types-3.mm: Likewise.
* obj-c++.dg/comp-types-5.mm: Likewise.
* obj-c++.dg/comp-types-6.mm: Likewise.
* obj-c++.dg/comp-types-7.mm: Likewise.
* obj-c++.dg/comp-types-8.mm: Likewise.
* obj-c++.dg/demangle-2.mm: Likewise.
* obj-c++.dg/demangle-3.mm: Likewise.
* obj-c++.dg/duplicate-class-1.mm: Likewise.
* obj-c++.dg/encode-1-next.mm: Likewise.
* obj-c++.dg/encode-1.mm: Likewise.
* obj-c++.dg/enhanced-proto-2.mm: Likewise.
* obj-c++.dg/exceptions-1.mm: Likewise.
* obj-c++.dg/exceptions-3.mm: Likewise.
* obj-c++.dg/exceptions-4.mm: Likewise.
* obj-c++.dg/exceptions-5.mm: Likewise.
* obj-c++.dg/extern-c-1.mm: Likewise.
* obj-c++.dg/fobjc-std-1.mm: Likewise.
* obj-c++.dg/gnu-api-2-class-meta.mm: Likewise.
* obj-c++.dg/gnu-api-2-class.mm: Likewise.
* obj-c++.dg/gnu-api-2-ivar.mm: Likewise.
* obj-c++.dg/gnu-api-2-method.mm: Likewise.
* obj-c++.dg/gnu-api-2-objc.mm: Likewise.
* obj-c++.dg/gnu-api-2-objc_msg_lookup.mm: Likewise.
* obj-c++.dg/gnu-api-2-object.mm: Likewise.
* obj-c++.dg/gnu-api-2-property.mm: Likewise.
* obj-c++.dg/gnu-api-2-protocol.mm: Likewise.
* obj-c++.dg/gnu-api-2-resolve-method.mm: Likewise.
* obj-c++.dg/gnu-api-2-sel.mm: Likewise.
* obj-c++.dg/invalid-method-2.mm: Likewise.
* obj-c++.dg/ivar-invalid-type-1.mm: Likewise.
* obj-c++.dg/ivar-problem-1.mm: Likewise.
* obj-c++.dg/lto/lto.exp: Likewise.
* obj-c++.dg/lto/trivial-1_0.mm: Likewise.
* obj-c++.dg/method-1.mm: Likewise.
* obj-c++.dg/method-12.mm: Likewise.
* obj-c++.dg/method-18.mm: Likewise.
* obj-c++.dg/method-19.mm: Likewise.
* obj-c++.dg/method-20.mm: Likewise.
* obj-c++.dg/method-3.mm: Likewise.
* obj-c++.dg/method-4.mm: Likewise.
* obj-c++.dg/method-5.mm: Likewise.
* obj-c++.dg/method-8.mm: Likewise.
* obj-c++.dg/method-9.mm: Likewise.
* obj-c++.dg/method-namespace-1.mm: Likewise.
* obj-c++.dg/plugin/diagnostic-test-expressions-1.mm:
Likewise.
* obj-c++.dg/pr23709.mm: Likewise.
* obj-c++.dg/pragma-2.mm: Likewise.
* obj-c++.dg/private-1.mm: Likewise.
* obj-c++.dg/private-2.mm: Likewise.
* obj-c++.dg/property/property.exp: Likewise.
* obj-c++.dg/proto-lossage-1.mm: Likewise.
* obj-c++.dg/proto-lossage-5.mm: Likewise.
* obj-c++.dg/proto-qual-1.mm: Likewise.
* obj-c++.dg/protocol-inheritance-1.mm: Likewise.
* obj-c++.dg/protocol-inheritance-2.mm: Likewise.
* obj-c++.dg/protocol-optional-1.mm: Likewise.
* obj-c++.dg/selector-1.mm: Likewise.
* obj-c++.dg/selector-2.mm: Likewise.
* obj-c++.dg/selector-3.mm: Likewise.
* obj-c++.dg/selector-4.mm: Likewise.
* obj-c++.dg/strings/strings.exp: Likewise.
* obj-c++.dg/stubify-1.mm: Likewise.
* obj-c++.dg/stubify-2.mm: Likewise.
* obj-c++.dg/super-dealloc-1.mm: Likewise.
* obj-c++.dg/super-dealloc-2.mm: Likewise.
* obj-c++.dg/sync-3.mm: Likewise.
* obj-c++.dg/syntax-error-2.mm: Likewise.
* obj-c++.dg/syntax-error-4.mm: Likewise.
* obj-c++.dg/syntax-error-7.mm: Likewise.
* obj-c++.dg/syntax-error-9.mm: Likewise.
* obj-c++.dg/template-4.mm: Likewise.
* obj-c++.dg/template-7.mm: Likewise.
* obj-c++.dg/template-8.mm: Likewise.
* obj-c++.dg/threedotthree-abi-1.mm: Likewise.
* obj-c++.dg/torture/dg-torture.exp: Likewise.
* obj-c++.dg/torture/strings/strings.exp: Likewise.
* obj-c++.dg/try-catch-12.mm: Likewise.
* obj-c++.dg/try-catch-13.mm: Likewise.

106 files changed:
gcc/testsuite/obj-c++.dg/attributes/class-attribute-1.mm
gcc/testsuite/obj-c++.dg/attributes/class-attribute-2.mm
gcc/testsuite/obj-c++.dg/attributes/class-attribute-3.mm
gcc/testsuite/obj-c++.dg/attributes/method-deprecated-1.mm
gcc/testsuite/obj-c++.dg/attributes/method-deprecated-2.mm
gcc/testsuite/obj-c++.dg/attributes/method-deprecated-3.mm
gcc/testsuite/obj-c++.dg/attributes/method-format-1.mm
gcc/testsuite/obj-c++.dg/attributes/method-nonnull-1.mm
gcc/testsuite/obj-c++.dg/attributes/method-noreturn-1.mm
gcc/testsuite/obj-c++.dg/attributes/method-sentinel-1.mm
gcc/testsuite/obj-c++.dg/attributes/nsobject-01.mm
gcc/testsuite/obj-c++.dg/attributes/parameter-attribute-1.mm
gcc/testsuite/obj-c++.dg/attributes/parameter-attribute-2.mm
gcc/testsuite/obj-c++.dg/attributes/proto-attribute-1.mm
gcc/testsuite/obj-c++.dg/attributes/proto-attribute-3.mm
gcc/testsuite/obj-c++.dg/attributes/proto-attribute-4.mm
gcc/testsuite/obj-c++.dg/attributes/unused-parameter-1.mm
gcc/testsuite/obj-c++.dg/bad-receiver-type.mm
gcc/testsuite/obj-c++.dg/bitfield-3.mm
gcc/testsuite/obj-c++.dg/bitfield-5.mm
gcc/testsuite/obj-c++.dg/class-extension-1.mm
gcc/testsuite/obj-c++.dg/class-extension-2.mm
gcc/testsuite/obj-c++.dg/class-extension-3.mm
gcc/testsuite/obj-c++.dg/class-extension-4.mm
gcc/testsuite/obj-c++.dg/class-protocol-1.mm
gcc/testsuite/obj-c++.dg/comp-types-1.mm
gcc/testsuite/obj-c++.dg/comp-types-10.mm
gcc/testsuite/obj-c++.dg/comp-types-2.mm
gcc/testsuite/obj-c++.dg/comp-types-3.mm
gcc/testsuite/obj-c++.dg/comp-types-5.mm
gcc/testsuite/obj-c++.dg/comp-types-6.mm
gcc/testsuite/obj-c++.dg/comp-types-7.mm
gcc/testsuite/obj-c++.dg/comp-types-8.mm
gcc/testsuite/obj-c++.dg/demangle-2.mm
gcc/testsuite/obj-c++.dg/demangle-3.mm
gcc/testsuite/obj-c++.dg/duplicate-class-1.mm
gcc/testsuite/obj-c++.dg/encode-1-next.mm
gcc/testsuite/obj-c++.dg/encode-1.mm
gcc/testsuite/obj-c++.dg/enhanced-proto-2.mm
gcc/testsuite/obj-c++.dg/exceptions-1.mm
gcc/testsuite/obj-c++.dg/exceptions-3.mm
gcc/testsuite/obj-c++.dg/exceptions-4.mm
gcc/testsuite/obj-c++.dg/exceptions-5.mm
gcc/testsuite/obj-c++.dg/extern-c-1.mm
gcc/testsuite/obj-c++.dg/fobjc-std-1.mm
gcc/testsuite/obj-c++.dg/gnu-api-2-class-meta.mm
gcc/testsuite/obj-c++.dg/gnu-api-2-class.mm
gcc/testsuite/obj-c++.dg/gnu-api-2-ivar.mm
gcc/testsuite/obj-c++.dg/gnu-api-2-method.mm
gcc/testsuite/obj-c++.dg/gnu-api-2-objc.mm
gcc/testsuite/obj-c++.dg/gnu-api-2-objc_msg_lookup.mm
gcc/testsuite/obj-c++.dg/gnu-api-2-object.mm
gcc/testsuite/obj-c++.dg/gnu-api-2-property.mm
gcc/testsuite/obj-c++.dg/gnu-api-2-protocol.mm
gcc/testsuite/obj-c++.dg/gnu-api-2-resolve-method.mm
gcc/testsuite/obj-c++.dg/gnu-api-2-sel.mm
gcc/testsuite/obj-c++.dg/invalid-method-2.mm
gcc/testsuite/obj-c++.dg/ivar-invalid-type-1.mm
gcc/testsuite/obj-c++.dg/ivar-problem-1.mm
gcc/testsuite/obj-c++.dg/lto/lto.exp
gcc/testsuite/obj-c++.dg/lto/trivial-1_0.mm
gcc/testsuite/obj-c++.dg/method-1.mm
gcc/testsuite/obj-c++.dg/method-12.mm
gcc/testsuite/obj-c++.dg/method-18.mm
gcc/testsuite/obj-c++.dg/method-19.mm
gcc/testsuite/obj-c++.dg/method-20.mm
gcc/testsuite/obj-c++.dg/method-3.mm
gcc/testsuite/obj-c++.dg/method-4.mm
gcc/testsuite/obj-c++.dg/method-5.mm
gcc/testsuite/obj-c++.dg/method-8.mm
gcc/testsuite/obj-c++.dg/method-9.mm
gcc/testsuite/obj-c++.dg/method-namespace-1.mm
gcc/testsuite/obj-c++.dg/plugin/diagnostic-test-expressions-1.mm
gcc/testsuite/obj-c++.dg/pr23709.mm
gcc/testsuite/obj-c++.dg/pragma-2.mm
gcc/testsuite/obj-c++.dg/private-1.mm
gcc/testsuite/obj-c++.dg/private-2.mm
gcc/testsuite/obj-c++.dg/property/property.exp
gcc/testsuite/obj-c++.dg/proto-lossage-1.mm
gcc/testsuite/obj-c++.dg/proto-lossage-5.mm
gcc/testsuite/obj-c++.dg/proto-qual-1.mm
gcc/testsuite/obj-c++.dg/protocol-inheritance-1.mm
gcc/testsuite/obj-c++.dg/protocol-inheritance-2.mm
gcc/testsuite/obj-c++.dg/protocol-optional-1.mm
gcc/testsuite/obj-c++.dg/selector-1.mm
gcc/testsuite/obj-c++.dg/selector-2.mm
gcc/testsuite/obj-c++.dg/selector-3.mm
gcc/testsuite/obj-c++.dg/selector-4.mm
gcc/testsuite/obj-c++.dg/strings/strings.exp
gcc/testsuite/obj-c++.dg/stubify-1.mm
gcc/testsuite/obj-c++.dg/stubify-2.mm
gcc/testsuite/obj-c++.dg/super-dealloc-1.mm
gcc/testsuite/obj-c++.dg/super-dealloc-2.mm
gcc/testsuite/obj-c++.dg/sync-3.mm
gcc/testsuite/obj-c++.dg/syntax-error-2.mm
gcc/testsuite/obj-c++.dg/syntax-error-4.mm
gcc/testsuite/obj-c++.dg/syntax-error-7.mm
gcc/testsuite/obj-c++.dg/syntax-error-9.mm
gcc/testsuite/obj-c++.dg/template-4.mm
gcc/testsuite/obj-c++.dg/template-7.mm
gcc/testsuite/obj-c++.dg/template-8.mm
gcc/testsuite/obj-c++.dg/threedotthree-abi-1.mm
gcc/testsuite/obj-c++.dg/torture/dg-torture.exp
gcc/testsuite/obj-c++.dg/torture/strings/strings.exp
gcc/testsuite/obj-c++.dg/try-catch-12.mm
gcc/testsuite/obj-c++.dg/try-catch-13.mm

index f078339b86705ce5b7a89019fd64e6988950d2c2..7eafdbc926eb9f447cfc75aac69a4d3ad048240f 100644 (file)
@@ -1,5 +1,6 @@
 /* { dg-do compile } */
 /* { dg-skip-if "No API#2 pre-Darwin9" { *-*-darwin[5-8]* } { "-fnext-runtime" } { "" } } */
+/* { dg-additional-options "-Wno-objc-root-class" } */
 
 /* Test deprecate attribute with an @interface declaration.  */
 
index 35015c0370a809461f2a479723e217edc8d3a9d6..629ba864b94bef2d0419d3ae26cff084d080a376 100644 (file)
@@ -1,4 +1,5 @@
 /* { dg-do compile } */
+/* { dg-additional-options "-Wno-objc-root-class" } */
 
 #include <objc/objc.h>
 
index f96500de4dc15b371b084d93610dca6e0e882cc9..3b7c8c384812536d2fd5b6ddd54d717289d9d51d 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 83f918c5a3fb8938e2801ed380c9aebae3058b95..af48787d76518001b65851f6705e3abba646c98d 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 2b8e6fd259def46f2a0a22b83533cadb9d232b4e..ece7a9f9caaf1d50c764f75b26265f4f4ce3df10 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 498fbc7e8fd55817a8576c369f00c97d75d54025..3af785b9aef1480f499e8bad38ef10fe45ff291b 100644 (file)
@@ -1,5 +1,5 @@
 /* Test handling of the NSObject attribute.  */
-/*  { dg-additional-options "-fsyntax-only " } */
+/* { dg-additional-options "-fsyntax-only -Wno-objc-root-class" } */
 
 typedef struct AnObj * __attribute__ ((NSObject)) AnObjRef;
 typedef struct AnObj * __attribute__ ((__NSObject__)) AnotherObjRef;
index a4ba25943ca968b340373080381c8900c5c9f714..b4556ba0788ca16aaa032e0e7562e80937848a98 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 3908faf99d92679d89968c20a7956484ed934d0e..9d69e4209c8b51b23ca2dbf6044be8c3f109d2ff 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 fc5251eeea1d3b0da0fcfdbb50d5608996df6a8d..263f92757b0df73fb5bc4285b0ee835ad341ad15 100644 (file)
@@ -1,7 +1,7 @@
 /* Contributed by Nicola Pero <nicola.pero@meta-innovation.com>, November 2010.  */
 /* { dg-do compile } */
 /* { dg-skip-if "No API#2 pre-Darwin9" { *-*-darwin[5-8]* } { "-fnext-runtime" } { "" } } */
-
+/* { dg-additional-options "-Wno-objc-root-class" } */
 
 /* Test deprecate attribute with normal @protocol declarations.  */
 
index d2e5f28a1b4abe1cd39998b6e4ffed1e6f4bb173..665e13da643b8828713ee72fab9ea33fa0dccb3d 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 8fbb11e201425fd0653f138e7b6cd5b8aaaf76a7..c56a7f7d68c018b6127c4076b9e32d2b48eec93f 100644 (file)
@@ -1,4 +1,5 @@
 /* { dg-do compile } */
+/* { dg-additional-options "-Wno-objc-root-class" } */
 
 #include <objc/objc.h>
 
index 1d6699f99c5846a1a6d60bd9b5edd2fc3b7d93c0..9c00a068168f4baa94e2a2c277e75db90d230299 100644 (file)
@@ -1,5 +1,6 @@
 // { dg-do compile } 
 // { dg-options "" }
+// { dg-additional-options "-Wno-objc-root-class" }
 
 @interface A
 
index d81976ab6244f8df927fb1497991fdc9f9d7515e..c4ed984ef52b26390851fb9fcd80f7a53ebceaf8 100644 (file)
@@ -4,6 +4,7 @@
 /* { dg-do run { target *-*-darwin* } } */
 /* { dg-skip-if "" { *-*-* } { "-fgnu-runtime" } { "" } } */
 /* { dg-options "-fsigned-char" } */
+// { dg-additional-options "-Wno-objc-root-class" }
 
 typedef struct objc_object { struct objc_class *class_pointer; } *id;
 
index 3b0065d7f61847262d170b53087ca86c26d726eb..d86c9b135d2de1aeee196d854eabcf8ffcaa034d 100644 (file)
@@ -3,6 +3,7 @@
   (@interface vs. @implementation) checks take the bitfield width into account.  */
 /* Author: Ziemowit Laski   <zlaski@apple.com>  */
 /* { dg-do compile } */
+// { dg-additional-options "-Wno-objc-root-class" }
 
 @interface Base {
   int i;
index 5c89a9838cfbd6e1983c4334999bb33d04227877..c497c1d938d85681a4dc677403cb92dd22e32e1a 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..108bc001d0ea3ed411a9ec02aba2e25da85b1179 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..bed849030d68b0b9bed82654dbc4031507b67292 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 9e19aa70d3bd9d8c963930eecc556595b41ae3d8..2cfbc5dd0e5ad197082d9cb4fdf95670a2292b59 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 78957cb061edf44d1b5ea576cd9372996743722f..3b332643a604f8112006c1bf15430062749e54c8 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 6d4e86e4b2a158f2105b4f11cbe73627563e4a6d..6402abc213b23f02714895937d1878df75feda85 100644 (file)
@@ -1,4 +1,5 @@
 /* { dg-do compile } */
+// { dg-additional-options "-Wno-objc-root-class" }
 
 @interface A
 + new;
index c7f0cb635c719d87d165aa0f5098cd94ac7dca65..fdfd0933b89276cb285825e4cc5504bae5b23596 100644 (file)
@@ -2,6 +2,7 @@
 /* { dg-do compile } */
 /* { dg-prune-output ".*internal compiler error.*" } */
 /* { dg-options "-O3" } */
+// { dg-additional-options "-Wno-objc-root-class" }
 
 @class NSString;
 @protocol NSObject
index 07043785a229eeedbeccf83c6368f09202daaefd..87750fd67dfb70268e371be4cb368fe90bbc8c88 100644 (file)
@@ -1,6 +1,7 @@
 /* Test various ObjC types assignments and comparisons.  */
 /* Author: Nicola Pero <nicola@brainstorm.co.uk>.  */
 /* { dg-do compile } */
+// { dg-additional-options "-Wno-objc-root-class" }
 
 #include <objc/objc.h>
 
index 2bea01534a729adff4ed3f60efa6d296a89954c6..d4d0790afcc694eb9cff935710879ca0ef085c11 100644 (file)
@@ -1,6 +1,7 @@
 /* Test simple ObjC types casts.  */
 /* Author: Nicola Pero <nicola@brainstorm.co.uk>.  */
 /* { dg-do compile } */
+// { dg-additional-options "-Wno-objc-root-class" }
 
 #include <objc/objc.h>
 
index 99f6772bd42eeb7742cc3189b147aaf0a1ad1f28..2c4fc57f0ac98704731f57a7b3d0e9f6b3de19a1 100644 (file)
@@ -1,6 +1,7 @@
 /* Test errors for assignments and comparisons between ObjC and C++ types.  */
 /* Author: Nicola Pero <nicola@brainstorm.co.uk>.  */
 /* { dg-do compile } */
+// { dg-additional-options "-Wno-objc-root-class" }
 
 #include <objc/objc.h>
 
index 23b84edd374d59025de1f6b013023270c20a414f..071a7563b8928f2d8c2e29356c6e0d39fcc9d81e 100644 (file)
@@ -1,6 +1,7 @@
 /* Test assignments and comparisons involving `one-off' protocols.  */
 /* Author: Nicola Pero <nicola@brainstorm.co.uk>.  */
 /* { dg-do compile } */
+// { dg-additional-options "-Wno-objc-root-class" }
 
 #include <objc/objc.h>
 
index e23558114bcd24fd050dcaba931f67ae9077347a..628635575f553d482ecf290984591fca07c20b00 100644 (file)
@@ -1,6 +1,7 @@
 /* Test assignments and comparisons involving category protocols.  */
 /* Author: Nicola Pero <nicola@brainstorm.co.uk>.  */
 /* { dg-do compile } */
+// { dg-additional-options "-Wno-objc-root-class" }
 
 #include <objc/objc.h>
 
index 6db76bb20f3d3dc0304d45810ea4cfa0bbdf2906..0221164ac851362a3e6c3e37ddfb0659bebd1ef7 100644 (file)
@@ -1,5 +1,6 @@
 /* { dg-do compile } */
 /* { dg-additional-options "-Wno-return-type" } */
+// { dg-additional-options "-Wno-objc-root-class" }
 
 /* We used to ICE because we removed the cast to List_linked*
    in -[ListIndex_linked next]. */
index f28208591372a443f155e09f40ffff15498c4871..14c7b3e18f87f8753c33f6f8332a3c3b964ceb79 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 <cstring>
 #include <cstdlib>
index afb83d75bfe31498802f2d2da551bf051905fa0d..d8d81784f867419f13a74424f024b369ac0b7d85 100644 (file)
@@ -1,6 +1,7 @@
 /* Test demangling an Objective-C method in error messages.  */
 /* { dg-do compile } */
 /* { dg-additional-options "-Wno-return-type" } */
+// { dg-additional-options "-Wno-objc-root-class" }
 
 #include <objc/objc.h>
 
index 3a5e5104faa5fad43de43d3ee7fc88d7c01c6599..77e52c6893f3da10a13c5c4267cfda51d9c2c6aa 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 47673f20cb20cfe37fb152ca2a35cc01483d8500..854dd728691c59939b8cf10748e66361ee06ff4a 100644 (file)
@@ -5,6 +5,7 @@
 
 /* { dg-do compile } */
 /* { dg-skip-if "" { *-*-* } { "-fgnu-runtime" } { "" } } */
+// { dg-additional-options "-Wno-objc-root-class" }
 
 struct Cxx {
   const struct Cxx *next;
index 5f5ba20139efef1618e1970d90adaa4f01444ef6..6247c648274a98e36e3fb9ccab277b7cf2ee8696 100644 (file)
@@ -3,6 +3,7 @@
 
 /* { dg-do compile } */
 /* { dg-skip-if "" { *-*-* } { "-fnext-runtime" } { "" } } */
+// { dg-additional-options "-Wno-objc-root-class" }
 
 struct Cxx {
   const struct Cxx *next;
index 31c2e509b7a15e5b9641872db14741aceef045a4..5964dfb09688698fdd8d7225979b50a2594925d0 100644 (file)
@@ -1,4 +1,5 @@
 /* { dg-do compile } */
+// { dg-additional-options "-Wno-objc-root-class" }
 
 @protocol MyProto1 
 @optional
index 0f3b7e8ae14706fbe9e453c61c25629383deddc1..75327ef7a9fa4ab2adc2fdf2eaad98db887fa128 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 622e4ca3b60aa7f7ea2e7d587782ebe110279251..7cf77a7821a3a5a2435dbb4c5eeb0e3beb12ae2b 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 4aa00a6006fbb50fc072791352b90c42b0ecc143..1391c43b8e5b39650db398216c4eeb8851a78262 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 5aa08f35821eeb05f0170df64fc9273aa35a767f..4547a756c74050398472a602995277a471daa69c 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.mm, but with no name for @catch arguments.  */
index c5fec6fbe931b3dd83fb56ea01946d9bb2116c6d..8b9147a807e92b13b55fc94d8f0472962d0c0d3d 100644 (file)
@@ -1,5 +1,6 @@
 /* Test extern c support inside @implementation */
 /* Devang Patel  <dpatel@apple.com>.  */
+// { dg-additional-options "-Wno-objc-root-class" }
 
 #include <objc/objc.h>
 
index 59db95091db550f1897f7a4bc5d96313bed249ce..f7f4a199dc0189e3bb43099b6fc105d06406cc79 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>
 
index bdaef9828ca457e9b728e331784a8ff2fa825bbe..92852c3ecea0eaea4951cb9c224db549e81c3e66 100644 (file)
@@ -21,6 +21,7 @@
 /* { 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 "-DOBJC_OLD_DISPATCH_PROTOTYPES" { target { *-*-darwin* } } } */
+// { dg-additional-options "-Wno-objc-root-class" }
 
 /* To get the modern GNU Objective-C Runtime API, you include
    objc/runtime.h.  */
index ae39026c2d348365cc8ebe255918d300d481e1ef..f6e3d8d22e030e2b97e771a6fc5ec3359925b93d 100644 (file)
@@ -8,6 +8,7 @@
 /* { 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 "-DOBJC_OLD_DISPATCH_PROTOTYPES" { target { *-*-darwin* } } } */
+// { dg-additional-options "-Wno-objc-root-class" }
 
 /* To get the modern GNU Objective-C Runtime API, you include
    objc/runtime.h.  */
index 1c85d238d60da757057b40827be055f430fffc61..991edc7271e6cf63862c6f1c7536e5f2310db73e 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 97bf84b6fc401ec11f07a5d682336eee377b3886..07c3a22ec32fc5adba1ebc56de8db15658035b44 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 201ab7e7af2f32d79012733546a11f85bfac13a5..e68e7a899fc8b7ca8d7bd5e973f80abc6812fc68 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 dcbf6d21f14ae0d2ce76f1b84fd7900e26a7f537..1fb56dcac901f1b0c32def64a26aeb99b54f7a3f 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 a2702d64707c8717bd45a153af6e63b0c40a87d9..4d99053103cc1560a022c7e53cdefdbea72ceb33 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 953e9bb156bcb2b55a3e08ffbc06d3a6e4eec962..601f39fa7e994cf4823b87cb00c6ff9a02f71c91 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 9a2ceca1353fb2abeabe04916a0115a390c8cd35..21ae06bfd276fb15847866bfd751c7d4cf851ad5 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 f8a54d392c3ec132341326c705ba02c5b050782f..dc311324c08fafbf44665c8689170356d8383799 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 ff50058566b4d5a5ecfc99dc617db3eaceeffdc9..dd8ff3eeefe2ddbbb0d219bab5ae5e233ac51798 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 e3a8ed1ff178b67d448d7840cc0604cfb96e6952..8eee0ff6432767ccb2b75f1995c0fb2c7c60287b 100644 (file)
@@ -1,4 +1,5 @@
 /* { dg-do compile } */
+// { dg-additional-options "-Wno-objc-root-class" }
 
 /* Test that using an invalid type in a method declaration produces a
    friendly error without a compiler crash.  */
index 4c1480a6be998e7be45678a46072133e38449d86..974e919d639d2f44cb9cd2f0e94cd14baa4adf7a 100644 (file)
@@ -1,4 +1,5 @@
 /* { dg-do compile } */
+// { dg-additional-options "-Wno-objc-root-class" }
 #include <objc/objc.h>
 
 @interface MyRootClass
index 4ed5afaf4ef3b3122cdaf971484a764363c18267..1736f9c445a4f4180313a8ae8f2b0bdd7abaf30f 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" }
 
 /* This test checks what happens if there are 16 instance variables.
    In that case, the class was not created correctly.  In this testcase,
index 6ba5f9c48fdf278debe78926e497ca2d8438e62e..936872a3bfe83fb1b89095cc84ce26f8a887bdb6 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}  \
 ]
 
 obj-c++_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 55f62f03cfc5f6fa789341200fbd248965d88264..c3620c36025d5011b66b490b936aa45a3ea9c35b 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-lto-do run } */
-/* { dg-skip-if "Needs OBJC2 ABI" { "*-*-darwin*" && lp64 } } */
+
 extern "C" {
 extern int printf (const char *,...) ;
 extern void abort (void) ;
index 7317ae2aa87c9359f24e7a58e7b23f74a950fd8e..5bb851ad5f664ca822a0ad6391c7396e4c15ff69 100644 (file)
@@ -3,6 +3,7 @@
 /* Author: Ziemowit Laski <zlaski@apple.com>.  */
 
 /* { dg-do compile } */
+// { dg-additional-options "-Wno-objc-root-class" }
 
 #include <objc/objc.h>
 
index 4546144517875f253d450122d63d524830b6e65c..d3145abadb30dcd7cb10a0745c72cf6e365a5cde 100644 (file)
@@ -3,6 +3,7 @@
 /* { dg-options "-Wstrict-selector-match" } */
 /* { dg-do compile } */
 /* { dg-skip-if "Object interface removed" { *-*-darwin[1-2]* && { lp64 } } { "-fnext-runtime" } { "" } } */
+// { dg-additional-options "-Wno-objc-root-class" }
 
 #include <objc/Protocol.h>
 
index 411caac111ad283318ec7431a18ce6905a4e8097..c753f33279d3fe7b1fd4a492daa2f3a9fd2eba03 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 225becae0f1586ff22f32e135f356dc77960905d..a3b977ef356cf0b5cdc3249a2bfee37c21dcdc5f 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..a7fe41d0905cbfc2490624a50dbd6a0727a83c9f 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 9dab8c5b3324fb7a92ec1c964a8629e5e32742b7..17b0c99fb9605a541afcb12872939842d2a185fb 100644 (file)
@@ -3,6 +3,7 @@
 
 /* { dg-do compile } */
 /* { dg-options "-Wno-strict-selector-match" } */
+// { dg-additional-options "-Wno-objc-root-class" }
 
 #include <objc/objc.h>
 
index e94f8f1b77096c5ce35e48769c86dd6991f8352e..1f2f93eb93db0768965b1e86833cb09fc018712f 100644 (file)
@@ -3,6 +3,7 @@
 
 /* { dg-do compile } */
 /* { dg-options "-Wstrict-selector-match" } */
+// { dg-additional-options "-Wno-objc-root-class" }
 
 #include <objc/objc.h>
 
index 17c841a46612272c7830c787edad52d990c8c9fb..10364cc38093b219fd1119698ba15c3d1db4307e 100644 (file)
@@ -3,6 +3,7 @@
 
 /* { dg-do compile } */
 /* { dg-options "-Wno-strict-selector-match" } */
+// { dg-additional-options "-Wno-objc-root-class" }
 
 #include <objc/objc.h>
 
index cde1bc27469bbf9fdb5c40ec56039322886167f5..9c5c17a96b4f81f514493e7d7e173ede3916104a 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 787e25d67ffd3f5c21d1fd2778546175dc3b99b7..bee076e7c98be25c2d133c896cb777ed121a48d8 100644 (file)
@@ -1,6 +1,7 @@
 /* Test for lookup of class (factory) methods.  */
 /* Author: Ziemowit Laski <zlaski@apple.com>.  */
 /* { dg-do compile } */
+// { dg-additional-options "-Wno-objc-root-class" }
 
 @interface MyBase 
 - (void) rootInstanceMethod;
index 6095f572ccacdf4dfe25cc22fd86a718ebc25a76..86006a73b8d5ceda7e058ff6d4e6dac65e427ec1 100644 (file)
@@ -1,5 +1,6 @@
 /* Test for usage of namespace inside @implementation. */
 /* { dg-do compile } */
+// { dg-additional-options "-Wno-objc-root-class" }
 @interface MyDocument
 @end
 
index 988b290ce690ed6f69f7c484861c1a4b3bfafe5e..128b3bd8fe998ad9a00316441fa1f3fa7d588376 100644 (file)
@@ -1,6 +1,7 @@
 /* { dg-do compile } */
 /* { dg-options "-O -fdiagnostics-show-caret" } */
 /* { dg-excess-errors "tree range 0:0-0:0" { target { *-*-darwin* } } }  */
+// { dg-additional-options "-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 018b53ac456656a2ea284738f2a28fbeac169d79..7936956854f9f27cfa3d80fc5f975c8e178d7c7b 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 14c4d7928a24f25cc844cfc65f2b9e5380131ef9..09feac7971f3c83587a86c886f30cb56b9aac5a3 100644 (file)
@@ -1,5 +1,6 @@
 /* It is OK to use #pragma inside @implementation body. This test checks that.  */
 /* Ziemowit Laski  <zlaski@apple.com>.  */
+// { dg-additional-options "-Wno-objc-root-class" }
 
 @interface A
 {
index 0c25aea5566d9250b88059222b6dfab43e039381..2173b90053043eb1680eed4ca7c16db7f1d2d269 100644 (file)
@@ -1,6 +1,7 @@
 /* Test errors for accessing @private and @protected variables.  */
 /* Based on work by: Nicola Pero <nicola@brainstorm.co.uk>.  */
 /* { dg-do compile } */
+// { dg-additional-options "-Wno-objc-root-class" }
 #include <objc/objc.h>
 
 @interface MySuperClass
index 3e6ff118d23cfdc99afb4a0a6e58a09aaa65fbec..93b8a8fd5c5d9bbec4fbf1bdd93e8b2ee18369d1 100644 (file)
@@ -2,6 +2,7 @@
 /* Based on work by: Nicola Pero <nicola@brainstorm.co.uk>.  */
 
 /* { dg-do compile } */
+// { dg-additional-options "-Wno-objc-root-class" }
 
 #include <objc/objc.h>
 
index d18f6100fcf70c1526548dddc8f326d315875beb..31e683c5c0001ab4147dab6021de0d716daf55b4 100644 (file)
@@ -31,12 +31,12 @@ dg-init
 set tests [lsort [glob -nocomplain $srcdir/$subdir/*.mm]]
 
 # Main loop.
-dg-runtest $tests "-fgnu-runtime" $DEFAULT_OBJCXXFLAGS
+dg-runtest $tests "-fgnu-runtime -Wno-objc-root-class" $DEFAULT_OBJCXXFLAGS
 
 # 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_OBJCXXFLAGS
+  dg-runtest $tests "-fnext-runtime -Wno-objc-root-class" $DEFAULT_OBJCXXFLAGS
 }
 
 # All done.
index 2f7eb9861400dd2d08f18044f0735d39096828a8..82cd05374b2e64d941074dca0bde7c846f22d844 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..2a30bc2a9af641f14eda82186f86204d044f1a41 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 7ef0e9a98ef570902ab52c03f42d8cc1322ce187..b2350648f229eca62a75ecc87ef090a7800bbc58 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 <stdio.h>
 #include <stdlib.h>
index 5241b29abbd404045d7704de083f0e8ccad3a598..c505c0083fa5cc836fd47f47ee5cdd59ad76c9b6 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..f2bc1cadc1814a712a6b09a5591d515684a24698 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..4ecf43629b9f0aa36e8b76a3833d26406d6fd4a1 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 d34f8c89cd6f4f9d39b5651f920df88e3f03cf4e..b0cdc9cc81b0ee84c388f97d60fe7960a80bf701 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 840ee19fee480663a4ec09836f4886175fc5d503..fa9ab4199f2e660891b7f8d619f2839d6657b5d4 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 a1321a7b74133c159225fbc844b2a8105d710544..0c9805626ed5b607de40c199d989ac680042a457 100644 (file)
@@ -2,6 +2,7 @@
 /* This is the "-fgnu-runtime" variant of objc.dg/selector-1.m.  */
 /* { dg-options "-Wselector -fgnu-runtime" } */
 /* { dg-do compile } */
+// { dg-additional-options "-Wno-objc-root-class" }
 
 typedef struct objc_object { struct objc_class *class_pointer; } *id;
 typedef const struct objc_selector    *SEL;
index 690cc44b698a9ff5fd938394b5a2aac2246d1a60..b6ddcbe43ebec8508a92fd3c09ed888aef592c6b 100644 (file)
@@ -3,6 +3,7 @@
 
 /* { dg-options "-Wselector -fnext-runtime" } */
 /* { dg-do compile } */
+// { dg-additional-options "-Wno-objc-root-class" }
 
 typedef struct objc_object { struct objc_class *class_pointer; } *id;
 typedef struct objc_selector *SEL;
index 1bfb3be7e00dffbf8fc0c045a83ade6bbb8afae8..0243f24f306a949da3370d20c64bacd35fbdd523 100644 (file)
@@ -34,11 +34,11 @@ dg-init
 set tests [lsort [glob -nocomplain $srcdir/$subdir/*.mm]]
 
 # Main loop.
-dg-runtest $tests "-fgnu-runtime" $DEFAULT_OBJCXXFLAGS
+dg-runtest $tests "-fgnu-runtime -Wno-objc-root-class" $DEFAULT_OBJCXXFLAGS
 
 # darwin targets can also run code with the NeXT runtime.
 if [istarget "*-*-darwin*" ] {
-  dg-runtest $tests "-fnext-runtime" $DEFAULT_OBJCXXFLAGS
+  dg-runtest $tests "-fnext-runtime -Wno-objc-root-class" $DEFAULT_OBJCXXFLAGS
 }
 
 # All done.
index a32e282519cd158c49db97c284d02eba2feb6e0f..21de46333fdb6a15966ec20bc5eec5899a516206 100644 (file)
@@ -5,6 +5,7 @@
 /* { dg-skip-if "" { *-*-* } { "-fgnu-runtime" } { "" } } */
 /* { dg-require-effective-target ilp32 } */
 /* { dg-options "-Os -mdynamic-no-pic -fno-exceptions -mmacosx-version-min=10.4 -msymbol-stubs" } */
+// { dg-additional-options "-Wno-objc-root-class" }
 
 typedef struct objc_object { } *id ;
 int x = 41 ;
index 69fea8def42e896c4c105d5cf49c8b2c53b8f9c5..cbc52b1a9e5e4f8f3e6c084f195136367643cd5e 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 0ab177bb73c9f0d2e6979279435d71a616626137..39ddd01f69418b62496abee14d1cdcec065d8a50 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..6dac31c17f4a0b96a4dfb214cd6a0c07546b225f 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 95def43d05db725355a2f30a8b379c6679e5b43d..2949d6a8a1358f5d2718fd184b88045d1fbd6f93 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 ba8804a89e28525dec2468724ceec9532e372557..bf4d5ffb4a7a5b0fc2ae31c82079bd1dda3ac763 100644 (file)
@@ -1,4 +1,5 @@
 /* Recover gracefully from a syntax error.  */
+// { dg-additional-options "-Wno-objc-root-class" }
 
 @implementation Whatever  /* { dg-warning "cannot find interface declaration for .Whatever." } */
 
index 0df061839b4993cec6dfeeec0e5cc590fabccfb4..97587f9849506078485485b58fba80e8213b726f 100644 (file)
@@ -1,5 +1,6 @@
 /* Yet another stray infinite loop... */
 /* { dg-do compile } */
+// { dg-additional-options "-Wno-objc-root-class" }
 
 @interface t
 {
index 5bdccc7b05f3a0e1da5195aeed343977a2ebbc44..c406d8fe769fdc134db78cc98360b8471642c0b0 100644 (file)
@@ -1,4 +1,5 @@
 /* { dg-do compile } */
+// { dg-additional-options "-Wno-objc-root-class" }
 
 @interface Foo
 -(void) someMethod;
index 1876c32dd20d6a3c520323600b205712d5485463..ad8837c28af8b719cdde3e3621dc7638695c0630 100644 (file)
@@ -1,3 +1,4 @@
+// { dg-additional-options "-Wno-objc-root-class" }
 @implementation SaturnDoc /* { dg-warning "cannot find interface declaration" } */
 - read: (void*)aStream ggg /* { dg-error "expected .:. at end of input" } */
 /* { dg-error "-:expected ..*. at end of input" "" { target *-*-* } .+1 } */
index 5301df5c0e0a6ee89913ba4b2983739f824dc103..02795e76e2877e991124e88e0eea9a49dcd82d1a 100644 (file)
@@ -4,6 +4,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.mm" } */
+// { dg-additional-options "-Wno-objc-root-class" }
 
 #include <stdarg.h>
 #include <stdlib.h>
index 8621abebaf1629057e93c8eabf0eb770806ba80f..b3697a584a0c2fd2ef0b6bbc063a964539370c1e 100644 (file)
@@ -3,6 +3,7 @@
 // Author: Fariborz Jahanian <fjahanian@apple.com>
 // { dg-do compile }
 // { dg-options "" }
+// { dg-additional-options "-Wno-objc-root-class" }
 typedef struct objc_class *Class;
 
 @interface Object
index df215b8525d287697d774bc28c67ee23c0027b22..1b9f4d16ae97397574b80566d71273bc2e6c5860 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" }
 
 #include <objc/objc.h>
 #include <objc/runtime.h>
index c48181049f1f5579d49818f49d82573114e1635c..32f4fd84e8873eef2360cfe58208863ef397e0b0 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 c3d3f8e29fd127460d8abc99f2b2cb2ba1baf972..4e4620791e87e057bac297762eacb884ba0d237a 100644 (file)
@@ -7,11 +7,11 @@ dg-init
 # Gather a list of all tests.
 set tests [lsort [glob -nocomplain $srcdir/$subdir/*.mm]]
  
-obj-c++-dg-runtest $tests "" "-fgnu-runtime"
+obj-c++-dg-runtest $tests "" "-fgnu-runtime  -Wno-objc-root-class"
 
 # darwin targets can also run code with the NeXT runtime.
 if [istarget "*-*-darwin*" ] {
-  obj-c++-dg-runtest $tests "" "-fnext-runtime"
+  obj-c++-dg-runtest $tests "" "-fnext-runtime  -Wno-objc-root-class"
 }
 
 dg-finish
index 401bc5856bfce0b087d9d6966c5efaa647470301..6181c30b1983625dd90dc33b4c64c49fb2d1bfe3 100644 (file)
@@ -24,11 +24,11 @@ dg-init
 # Gather a list of all tests.
 set tests [lsort [glob -nocomplain $srcdir/$subdir/*.mm]]
 
-obj-c++-dg-runtest $tests "" "-fgnu-runtime"
+obj-c++-dg-runtest $tests "" "-fgnu-runtime  -Wno-objc-root-class"
 
 # Darwin targets can also run code with the NeXT runtime.
 if [istarget "*-*-darwin*" ] {
-  obj-c++-dg-runtest $tests "" "-fnext-runtime"
+  obj-c++-dg-runtest $tests "" "-fnext-runtime  -Wno-objc-root-class"
 }
 
 dg-finish
index e08f321e8c79f077b5b4cbd41a68dd0b2106b1d4..6a60805578400de8e2a894103851a8aa18f1d76b 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 050d81135556f92d8b8a7846452d2d4a799ef503..0e6f01b23e9703d976d13ca5fbdb6395b7277172 100644 (file)
@@ -4,6 +4,7 @@
 
 /* { dg-options "-fobjc-exceptions" } */
 /* { dg-do compile } */
+// { dg-additional-options "-Wno-objc-root-class" }
 
 @interface TestMyTests
 - (void) testSpoon;