aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIain Sandoe <iain@sandoe.co.uk>2020-10-25 09:54:21 +0000
committerIain Sandoe <iain@sandoe.co.uk>2020-11-13 10:40:54 +0000
commit64f191b152cb1df0e108a91880cb415e413bad56 (patch)
treeacee7d1e946050eff9f22c8bf921f29c82319495
parentd35fbf7f7673b5c72ee61720f1a209d4e798152f (diff)
downloadgcc-64f191b152cb1df0e108a91880cb415e413bad56.zip
gcc-64f191b152cb1df0e108a91880cb415e413bad56.tar.gz
gcc-64f191b152cb1df0e108a91880cb415e413bad56.tar.bz2
Objective-C [3/3] : Implement Wobjc-root-class [PR77404].
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.
-rw-r--r--gcc/testsuite/obj-c++.dg/attributes/class-attribute-1.mm1
-rw-r--r--gcc/testsuite/obj-c++.dg/attributes/class-attribute-2.mm1
-rw-r--r--gcc/testsuite/obj-c++.dg/attributes/class-attribute-3.mm1
-rw-r--r--gcc/testsuite/obj-c++.dg/attributes/method-deprecated-1.mm1
-rw-r--r--gcc/testsuite/obj-c++.dg/attributes/method-deprecated-2.mm1
-rw-r--r--gcc/testsuite/obj-c++.dg/attributes/method-deprecated-3.mm1
-rw-r--r--gcc/testsuite/obj-c++.dg/attributes/method-format-1.mm1
-rw-r--r--gcc/testsuite/obj-c++.dg/attributes/method-nonnull-1.mm1
-rw-r--r--gcc/testsuite/obj-c++.dg/attributes/method-noreturn-1.mm1
-rw-r--r--gcc/testsuite/obj-c++.dg/attributes/method-sentinel-1.mm1
-rw-r--r--gcc/testsuite/obj-c++.dg/attributes/nsobject-01.mm2
-rw-r--r--gcc/testsuite/obj-c++.dg/attributes/parameter-attribute-1.mm1
-rw-r--r--gcc/testsuite/obj-c++.dg/attributes/parameter-attribute-2.mm1
-rw-r--r--gcc/testsuite/obj-c++.dg/attributes/proto-attribute-1.mm1
-rw-r--r--gcc/testsuite/obj-c++.dg/attributes/proto-attribute-3.mm2
-rw-r--r--gcc/testsuite/obj-c++.dg/attributes/proto-attribute-4.mm1
-rw-r--r--gcc/testsuite/obj-c++.dg/attributes/unused-parameter-1.mm1
-rw-r--r--gcc/testsuite/obj-c++.dg/bad-receiver-type.mm1
-rw-r--r--gcc/testsuite/obj-c++.dg/bitfield-3.mm1
-rw-r--r--gcc/testsuite/obj-c++.dg/bitfield-5.mm1
-rw-r--r--gcc/testsuite/obj-c++.dg/class-extension-1.mm1
-rw-r--r--gcc/testsuite/obj-c++.dg/class-extension-2.mm1
-rw-r--r--gcc/testsuite/obj-c++.dg/class-extension-3.mm1
-rw-r--r--gcc/testsuite/obj-c++.dg/class-extension-4.mm1
-rw-r--r--gcc/testsuite/obj-c++.dg/class-protocol-1.mm1
-rw-r--r--gcc/testsuite/obj-c++.dg/comp-types-1.mm1
-rw-r--r--gcc/testsuite/obj-c++.dg/comp-types-10.mm1
-rw-r--r--gcc/testsuite/obj-c++.dg/comp-types-2.mm1
-rw-r--r--gcc/testsuite/obj-c++.dg/comp-types-3.mm1
-rw-r--r--gcc/testsuite/obj-c++.dg/comp-types-5.mm1
-rw-r--r--gcc/testsuite/obj-c++.dg/comp-types-6.mm1
-rw-r--r--gcc/testsuite/obj-c++.dg/comp-types-7.mm1
-rw-r--r--gcc/testsuite/obj-c++.dg/comp-types-8.mm1
-rw-r--r--gcc/testsuite/obj-c++.dg/demangle-2.mm1
-rw-r--r--gcc/testsuite/obj-c++.dg/demangle-3.mm1
-rw-r--r--gcc/testsuite/obj-c++.dg/duplicate-class-1.mm1
-rw-r--r--gcc/testsuite/obj-c++.dg/encode-1-next.mm1
-rw-r--r--gcc/testsuite/obj-c++.dg/encode-1.mm1
-rw-r--r--gcc/testsuite/obj-c++.dg/enhanced-proto-2.mm1
-rw-r--r--gcc/testsuite/obj-c++.dg/exceptions-1.mm1
-rw-r--r--gcc/testsuite/obj-c++.dg/exceptions-3.mm1
-rw-r--r--gcc/testsuite/obj-c++.dg/exceptions-4.mm1
-rw-r--r--gcc/testsuite/obj-c++.dg/exceptions-5.mm1
-rw-r--r--gcc/testsuite/obj-c++.dg/extern-c-1.mm1
-rw-r--r--gcc/testsuite/obj-c++.dg/fobjc-std-1.mm1
-rw-r--r--gcc/testsuite/obj-c++.dg/gnu-api-2-class-meta.mm1
-rw-r--r--gcc/testsuite/obj-c++.dg/gnu-api-2-class.mm1
-rw-r--r--gcc/testsuite/obj-c++.dg/gnu-api-2-ivar.mm1
-rw-r--r--gcc/testsuite/obj-c++.dg/gnu-api-2-method.mm1
-rw-r--r--gcc/testsuite/obj-c++.dg/gnu-api-2-objc.mm1
-rw-r--r--gcc/testsuite/obj-c++.dg/gnu-api-2-objc_msg_lookup.mm1
-rw-r--r--gcc/testsuite/obj-c++.dg/gnu-api-2-object.mm1
-rw-r--r--gcc/testsuite/obj-c++.dg/gnu-api-2-property.mm1
-rw-r--r--gcc/testsuite/obj-c++.dg/gnu-api-2-protocol.mm1
-rw-r--r--gcc/testsuite/obj-c++.dg/gnu-api-2-resolve-method.mm1
-rw-r--r--gcc/testsuite/obj-c++.dg/gnu-api-2-sel.mm1
-rw-r--r--gcc/testsuite/obj-c++.dg/invalid-method-2.mm1
-rw-r--r--gcc/testsuite/obj-c++.dg/ivar-invalid-type-1.mm1
-rw-r--r--gcc/testsuite/obj-c++.dg/ivar-problem-1.mm1
-rw-r--r--gcc/testsuite/obj-c++.dg/lto/lto.exp16
-rw-r--r--gcc/testsuite/obj-c++.dg/lto/trivial-1_0.mm2
-rw-r--r--gcc/testsuite/obj-c++.dg/method-1.mm1
-rw-r--r--gcc/testsuite/obj-c++.dg/method-12.mm1
-rw-r--r--gcc/testsuite/obj-c++.dg/method-18.mm1
-rw-r--r--gcc/testsuite/obj-c++.dg/method-19.mm1
-rw-r--r--gcc/testsuite/obj-c++.dg/method-20.mm1
-rw-r--r--gcc/testsuite/obj-c++.dg/method-3.mm1
-rw-r--r--gcc/testsuite/obj-c++.dg/method-4.mm1
-rw-r--r--gcc/testsuite/obj-c++.dg/method-5.mm1
-rw-r--r--gcc/testsuite/obj-c++.dg/method-8.mm1
-rw-r--r--gcc/testsuite/obj-c++.dg/method-9.mm1
-rw-r--r--gcc/testsuite/obj-c++.dg/method-namespace-1.mm1
-rw-r--r--gcc/testsuite/obj-c++.dg/plugin/diagnostic-test-expressions-1.mm1
-rw-r--r--gcc/testsuite/obj-c++.dg/pr23709.mm1
-rw-r--r--gcc/testsuite/obj-c++.dg/pragma-2.mm1
-rw-r--r--gcc/testsuite/obj-c++.dg/private-1.mm1
-rw-r--r--gcc/testsuite/obj-c++.dg/private-2.mm1
-rw-r--r--gcc/testsuite/obj-c++.dg/property/property.exp4
-rw-r--r--gcc/testsuite/obj-c++.dg/proto-lossage-1.mm1
-rw-r--r--gcc/testsuite/obj-c++.dg/proto-lossage-5.mm1
-rw-r--r--gcc/testsuite/obj-c++.dg/proto-qual-1.mm1
-rw-r--r--gcc/testsuite/obj-c++.dg/protocol-inheritance-1.mm1
-rw-r--r--gcc/testsuite/obj-c++.dg/protocol-inheritance-2.mm1
-rw-r--r--gcc/testsuite/obj-c++.dg/protocol-optional-1.mm1
-rw-r--r--gcc/testsuite/obj-c++.dg/selector-1.mm1
-rw-r--r--gcc/testsuite/obj-c++.dg/selector-2.mm1
-rw-r--r--gcc/testsuite/obj-c++.dg/selector-3.mm1
-rw-r--r--gcc/testsuite/obj-c++.dg/selector-4.mm1
-rw-r--r--gcc/testsuite/obj-c++.dg/strings/strings.exp4
-rw-r--r--gcc/testsuite/obj-c++.dg/stubify-1.mm1
-rw-r--r--gcc/testsuite/obj-c++.dg/stubify-2.mm1
-rw-r--r--gcc/testsuite/obj-c++.dg/super-dealloc-1.mm1
-rw-r--r--gcc/testsuite/obj-c++.dg/super-dealloc-2.mm1
-rw-r--r--gcc/testsuite/obj-c++.dg/sync-3.mm1
-rw-r--r--gcc/testsuite/obj-c++.dg/syntax-error-2.mm1
-rw-r--r--gcc/testsuite/obj-c++.dg/syntax-error-4.mm1
-rw-r--r--gcc/testsuite/obj-c++.dg/syntax-error-7.mm1
-rw-r--r--gcc/testsuite/obj-c++.dg/syntax-error-9.mm1
-rw-r--r--gcc/testsuite/obj-c++.dg/template-4.mm1
-rw-r--r--gcc/testsuite/obj-c++.dg/template-7.mm1
-rw-r--r--gcc/testsuite/obj-c++.dg/template-8.mm1
-rw-r--r--gcc/testsuite/obj-c++.dg/threedotthree-abi-1.mm1
-rw-r--r--gcc/testsuite/obj-c++.dg/torture/dg-torture.exp4
-rw-r--r--gcc/testsuite/obj-c++.dg/torture/strings/strings.exp4
-rw-r--r--gcc/testsuite/obj-c++.dg/try-catch-12.mm1
-rw-r--r--gcc/testsuite/obj-c++.dg/try-catch-13.mm1
106 files changed, 117 insertions, 19 deletions
diff --git a/gcc/testsuite/obj-c++.dg/attributes/class-attribute-1.mm b/gcc/testsuite/obj-c++.dg/attributes/class-attribute-1.mm
index f078339..7eafdbc 100644
--- a/gcc/testsuite/obj-c++.dg/attributes/class-attribute-1.mm
+++ b/gcc/testsuite/obj-c++.dg/attributes/class-attribute-1.mm
@@ -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. */
diff --git a/gcc/testsuite/obj-c++.dg/attributes/class-attribute-2.mm b/gcc/testsuite/obj-c++.dg/attributes/class-attribute-2.mm
index 35015c0..629ba86 100644
--- a/gcc/testsuite/obj-c++.dg/attributes/class-attribute-2.mm
+++ b/gcc/testsuite/obj-c++.dg/attributes/class-attribute-2.mm
@@ -1,4 +1,5 @@
/* { dg-do compile } */
+/* { dg-additional-options "-Wno-objc-root-class" } */
#include <objc/objc.h>
diff --git a/gcc/testsuite/obj-c++.dg/attributes/class-attribute-3.mm b/gcc/testsuite/obj-c++.dg/attributes/class-attribute-3.mm
index f96500d..3b7c8c3 100644
--- a/gcc/testsuite/obj-c++.dg/attributes/class-attribute-3.mm
+++ b/gcc/testsuite/obj-c++.dg/attributes/class-attribute-3.mm
@@ -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. */
diff --git a/gcc/testsuite/obj-c++.dg/attributes/method-deprecated-1.mm b/gcc/testsuite/obj-c++.dg/attributes/method-deprecated-1.mm
index 8343856..68e8373 100644
--- a/gcc/testsuite/obj-c++.dg/attributes/method-deprecated-1.mm
+++ b/gcc/testsuite/obj-c++.dg/attributes/method-deprecated-1.mm
@@ -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>
diff --git a/gcc/testsuite/obj-c++.dg/attributes/method-deprecated-2.mm b/gcc/testsuite/obj-c++.dg/attributes/method-deprecated-2.mm
index 1e5d87f..8fb0e15 100644
--- a/gcc/testsuite/obj-c++.dg/attributes/method-deprecated-2.mm
+++ b/gcc/testsuite/obj-c++.dg/attributes/method-deprecated-2.mm
@@ -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>
diff --git a/gcc/testsuite/obj-c++.dg/attributes/method-deprecated-3.mm b/gcc/testsuite/obj-c++.dg/attributes/method-deprecated-3.mm
index 5c715a2..efa2d34 100644
--- a/gcc/testsuite/obj-c++.dg/attributes/method-deprecated-3.mm
+++ b/gcc/testsuite/obj-c++.dg/attributes/method-deprecated-3.mm
@@ -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>
diff --git a/gcc/testsuite/obj-c++.dg/attributes/method-format-1.mm b/gcc/testsuite/obj-c++.dg/attributes/method-format-1.mm
index 9ff34f9..d3bb997 100644
--- a/gcc/testsuite/obj-c++.dg/attributes/method-format-1.mm
+++ b/gcc/testsuite/obj-c++.dg/attributes/method-format-1.mm
@@ -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>
diff --git a/gcc/testsuite/obj-c++.dg/attributes/method-nonnull-1.mm b/gcc/testsuite/obj-c++.dg/attributes/method-nonnull-1.mm
index 83f918c..af48787 100644
--- a/gcc/testsuite/obj-c++.dg/attributes/method-nonnull-1.mm
+++ b/gcc/testsuite/obj-c++.dg/attributes/method-nonnull-1.mm
@@ -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>
diff --git a/gcc/testsuite/obj-c++.dg/attributes/method-noreturn-1.mm b/gcc/testsuite/obj-c++.dg/attributes/method-noreturn-1.mm
index a83048b..413a0be 100644
--- a/gcc/testsuite/obj-c++.dg/attributes/method-noreturn-1.mm
+++ b/gcc/testsuite/obj-c++.dg/attributes/method-noreturn-1.mm
@@ -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>
diff --git a/gcc/testsuite/obj-c++.dg/attributes/method-sentinel-1.mm b/gcc/testsuite/obj-c++.dg/attributes/method-sentinel-1.mm
index 2b8e6fd..ece7a9f 100644
--- a/gcc/testsuite/obj-c++.dg/attributes/method-sentinel-1.mm
+++ b/gcc/testsuite/obj-c++.dg/attributes/method-sentinel-1.mm
@@ -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>
diff --git a/gcc/testsuite/obj-c++.dg/attributes/nsobject-01.mm b/gcc/testsuite/obj-c++.dg/attributes/nsobject-01.mm
index 498fbc7..3af785b 100644
--- a/gcc/testsuite/obj-c++.dg/attributes/nsobject-01.mm
+++ b/gcc/testsuite/obj-c++.dg/attributes/nsobject-01.mm
@@ -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;
diff --git a/gcc/testsuite/obj-c++.dg/attributes/parameter-attribute-1.mm b/gcc/testsuite/obj-c++.dg/attributes/parameter-attribute-1.mm
index a4ba2594..b4556ba 100644
--- a/gcc/testsuite/obj-c++.dg/attributes/parameter-attribute-1.mm
+++ b/gcc/testsuite/obj-c++.dg/attributes/parameter-attribute-1.mm
@@ -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>
diff --git a/gcc/testsuite/obj-c++.dg/attributes/parameter-attribute-2.mm b/gcc/testsuite/obj-c++.dg/attributes/parameter-attribute-2.mm
index 3908faf..9d69e42 100644
--- a/gcc/testsuite/obj-c++.dg/attributes/parameter-attribute-2.mm
+++ b/gcc/testsuite/obj-c++.dg/attributes/parameter-attribute-2.mm
@@ -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>
diff --git a/gcc/testsuite/obj-c++.dg/attributes/proto-attribute-1.mm b/gcc/testsuite/obj-c++.dg/attributes/proto-attribute-1.mm
index a852a7a..03726dc 100644
--- a/gcc/testsuite/obj-c++.dg/attributes/proto-attribute-1.mm
+++ b/gcc/testsuite/obj-c++.dg/attributes/proto-attribute-1.mm
@@ -1,4 +1,5 @@
/* { dg-do compile } */
+/* { dg-additional-options "-Wno-objc-root-class" } */
#include <objc/objc.h>
diff --git a/gcc/testsuite/obj-c++.dg/attributes/proto-attribute-3.mm b/gcc/testsuite/obj-c++.dg/attributes/proto-attribute-3.mm
index fc5251e..263f927 100644
--- a/gcc/testsuite/obj-c++.dg/attributes/proto-attribute-3.mm
+++ b/gcc/testsuite/obj-c++.dg/attributes/proto-attribute-3.mm
@@ -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. */
diff --git a/gcc/testsuite/obj-c++.dg/attributes/proto-attribute-4.mm b/gcc/testsuite/obj-c++.dg/attributes/proto-attribute-4.mm
index d2e5f28..665e13d 100644
--- a/gcc/testsuite/obj-c++.dg/attributes/proto-attribute-4.mm
+++ b/gcc/testsuite/obj-c++.dg/attributes/proto-attribute-4.mm
@@ -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. */
diff --git a/gcc/testsuite/obj-c++.dg/attributes/unused-parameter-1.mm b/gcc/testsuite/obj-c++.dg/attributes/unused-parameter-1.mm
index 8fbb11e..c56a7f7 100644
--- a/gcc/testsuite/obj-c++.dg/attributes/unused-parameter-1.mm
+++ b/gcc/testsuite/obj-c++.dg/attributes/unused-parameter-1.mm
@@ -1,4 +1,5 @@
/* { dg-do compile } */
+/* { dg-additional-options "-Wno-objc-root-class" } */
#include <objc/objc.h>
diff --git a/gcc/testsuite/obj-c++.dg/bad-receiver-type.mm b/gcc/testsuite/obj-c++.dg/bad-receiver-type.mm
index 1d6699f..9c00a06 100644
--- a/gcc/testsuite/obj-c++.dg/bad-receiver-type.mm
+++ b/gcc/testsuite/obj-c++.dg/bad-receiver-type.mm
@@ -1,5 +1,6 @@
// { dg-do compile }
// { dg-options "" }
+// { dg-additional-options "-Wno-objc-root-class" }
@interface A
diff --git a/gcc/testsuite/obj-c++.dg/bitfield-3.mm b/gcc/testsuite/obj-c++.dg/bitfield-3.mm
index d81976a..c4ed984 100644
--- a/gcc/testsuite/obj-c++.dg/bitfield-3.mm
+++ b/gcc/testsuite/obj-c++.dg/bitfield-3.mm
@@ -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;
diff --git a/gcc/testsuite/obj-c++.dg/bitfield-5.mm b/gcc/testsuite/obj-c++.dg/bitfield-5.mm
index 3b0065d..d86c9b1 100644
--- a/gcc/testsuite/obj-c++.dg/bitfield-5.mm
+++ b/gcc/testsuite/obj-c++.dg/bitfield-5.mm
@@ -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;
diff --git a/gcc/testsuite/obj-c++.dg/class-extension-1.mm b/gcc/testsuite/obj-c++.dg/class-extension-1.mm
index 5c89a98..c497c1d 100644
--- a/gcc/testsuite/obj-c++.dg/class-extension-1.mm
+++ b/gcc/testsuite/obj-c++.dg/class-extension-1.mm
@@ -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. */
diff --git a/gcc/testsuite/obj-c++.dg/class-extension-2.mm b/gcc/testsuite/obj-c++.dg/class-extension-2.mm
index 7f55b60..108bc00 100644
--- a/gcc/testsuite/obj-c++.dg/class-extension-2.mm
+++ b/gcc/testsuite/obj-c++.dg/class-extension-2.mm
@@ -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. */
diff --git a/gcc/testsuite/obj-c++.dg/class-extension-3.mm b/gcc/testsuite/obj-c++.dg/class-extension-3.mm
index 69e5705..bed8490 100644
--- a/gcc/testsuite/obj-c++.dg/class-extension-3.mm
+++ b/gcc/testsuite/obj-c++.dg/class-extension-3.mm
@@ -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. */
diff --git a/gcc/testsuite/obj-c++.dg/class-extension-4.mm b/gcc/testsuite/obj-c++.dg/class-extension-4.mm
index 9e19aa7..2cfbc5d 100644
--- a/gcc/testsuite/obj-c++.dg/class-extension-4.mm
+++ b/gcc/testsuite/obj-c++.dg/class-extension-4.mm
@@ -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. */
diff --git a/gcc/testsuite/obj-c++.dg/class-protocol-1.mm b/gcc/testsuite/obj-c++.dg/class-protocol-1.mm
index 78957cb..3b33264 100644
--- a/gcc/testsuite/obj-c++.dg/class-protocol-1.mm
+++ b/gcc/testsuite/obj-c++.dg/class-protocol-1.mm
@@ -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"
diff --git a/gcc/testsuite/obj-c++.dg/comp-types-1.mm b/gcc/testsuite/obj-c++.dg/comp-types-1.mm
index 6d4e86e..6402abc 100644
--- a/gcc/testsuite/obj-c++.dg/comp-types-1.mm
+++ b/gcc/testsuite/obj-c++.dg/comp-types-1.mm
@@ -1,4 +1,5 @@
/* { dg-do compile } */
+// { dg-additional-options "-Wno-objc-root-class" }
@interface A
+ new;
diff --git a/gcc/testsuite/obj-c++.dg/comp-types-10.mm b/gcc/testsuite/obj-c++.dg/comp-types-10.mm
index c7f0cb6..fdfd093 100644
--- a/gcc/testsuite/obj-c++.dg/comp-types-10.mm
+++ b/gcc/testsuite/obj-c++.dg/comp-types-10.mm
@@ -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
diff --git a/gcc/testsuite/obj-c++.dg/comp-types-2.mm b/gcc/testsuite/obj-c++.dg/comp-types-2.mm
index 0704378..87750fd 100644
--- a/gcc/testsuite/obj-c++.dg/comp-types-2.mm
+++ b/gcc/testsuite/obj-c++.dg/comp-types-2.mm
@@ -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>
diff --git a/gcc/testsuite/obj-c++.dg/comp-types-3.mm b/gcc/testsuite/obj-c++.dg/comp-types-3.mm
index 2bea015..d4d0790 100644
--- a/gcc/testsuite/obj-c++.dg/comp-types-3.mm
+++ b/gcc/testsuite/obj-c++.dg/comp-types-3.mm
@@ -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>
diff --git a/gcc/testsuite/obj-c++.dg/comp-types-5.mm b/gcc/testsuite/obj-c++.dg/comp-types-5.mm
index 99f6772..2c4fc57 100644
--- a/gcc/testsuite/obj-c++.dg/comp-types-5.mm
+++ b/gcc/testsuite/obj-c++.dg/comp-types-5.mm
@@ -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>
diff --git a/gcc/testsuite/obj-c++.dg/comp-types-6.mm b/gcc/testsuite/obj-c++.dg/comp-types-6.mm
index 23b84ed..071a756 100644
--- a/gcc/testsuite/obj-c++.dg/comp-types-6.mm
+++ b/gcc/testsuite/obj-c++.dg/comp-types-6.mm
@@ -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>
diff --git a/gcc/testsuite/obj-c++.dg/comp-types-7.mm b/gcc/testsuite/obj-c++.dg/comp-types-7.mm
index e235581..6286355 100644
--- a/gcc/testsuite/obj-c++.dg/comp-types-7.mm
+++ b/gcc/testsuite/obj-c++.dg/comp-types-7.mm
@@ -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>
diff --git a/gcc/testsuite/obj-c++.dg/comp-types-8.mm b/gcc/testsuite/obj-c++.dg/comp-types-8.mm
index 6db76bb..0221164 100644
--- a/gcc/testsuite/obj-c++.dg/comp-types-8.mm
+++ b/gcc/testsuite/obj-c++.dg/comp-types-8.mm
@@ -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]. */
diff --git a/gcc/testsuite/obj-c++.dg/demangle-2.mm b/gcc/testsuite/obj-c++.dg/demangle-2.mm
index f282085..14c7b3e 100644
--- a/gcc/testsuite/obj-c++.dg/demangle-2.mm
+++ b/gcc/testsuite/obj-c++.dg/demangle-2.mm
@@ -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>
diff --git a/gcc/testsuite/obj-c++.dg/demangle-3.mm b/gcc/testsuite/obj-c++.dg/demangle-3.mm
index afb83d7..d8d8178 100644
--- a/gcc/testsuite/obj-c++.dg/demangle-3.mm
+++ b/gcc/testsuite/obj-c++.dg/demangle-3.mm
@@ -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>
diff --git a/gcc/testsuite/obj-c++.dg/duplicate-class-1.mm b/gcc/testsuite/obj-c++.dg/duplicate-class-1.mm
index 3a5e510..77e52c6 100644
--- a/gcc/testsuite/obj-c++.dg/duplicate-class-1.mm
+++ b/gcc/testsuite/obj-c++.dg/duplicate-class-1.mm
@@ -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. */
diff --git a/gcc/testsuite/obj-c++.dg/encode-1-next.mm b/gcc/testsuite/obj-c++.dg/encode-1-next.mm
index 47673f2..854dd72 100644
--- a/gcc/testsuite/obj-c++.dg/encode-1-next.mm
+++ b/gcc/testsuite/obj-c++.dg/encode-1-next.mm
@@ -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;
diff --git a/gcc/testsuite/obj-c++.dg/encode-1.mm b/gcc/testsuite/obj-c++.dg/encode-1.mm
index 5f5ba20..6247c64 100644
--- a/gcc/testsuite/obj-c++.dg/encode-1.mm
+++ b/gcc/testsuite/obj-c++.dg/encode-1.mm
@@ -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;
diff --git a/gcc/testsuite/obj-c++.dg/enhanced-proto-2.mm b/gcc/testsuite/obj-c++.dg/enhanced-proto-2.mm
index 31c2e50..5964dfb 100644
--- a/gcc/testsuite/obj-c++.dg/enhanced-proto-2.mm
+++ b/gcc/testsuite/obj-c++.dg/enhanced-proto-2.mm
@@ -1,4 +1,5 @@
/* { dg-do compile } */
+// { dg-additional-options "-Wno-objc-root-class" }
@protocol MyProto1
@optional
diff --git a/gcc/testsuite/obj-c++.dg/exceptions-1.mm b/gcc/testsuite/obj-c++.dg/exceptions-1.mm
index 0f3b7e8..75327ef 100644
--- a/gcc/testsuite/obj-c++.dg/exceptions-1.mm
+++ b/gcc/testsuite/obj-c++.dg/exceptions-1.mm
@@ -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
diff --git a/gcc/testsuite/obj-c++.dg/exceptions-3.mm b/gcc/testsuite/obj-c++.dg/exceptions-3.mm
index 622e4ca..7cf77a7 100644
--- a/gcc/testsuite/obj-c++.dg/exceptions-3.mm
+++ b/gcc/testsuite/obj-c++.dg/exceptions-3.mm
@@ -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. */
diff --git a/gcc/testsuite/obj-c++.dg/exceptions-4.mm b/gcc/testsuite/obj-c++.dg/exceptions-4.mm
index 4aa00a6..1391c43 100644
--- a/gcc/testsuite/obj-c++.dg/exceptions-4.mm
+++ b/gcc/testsuite/obj-c++.dg/exceptions-4.mm
@@ -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(). */
diff --git a/gcc/testsuite/obj-c++.dg/exceptions-5.mm b/gcc/testsuite/obj-c++.dg/exceptions-5.mm
index 5aa08f3..4547a75 100644
--- a/gcc/testsuite/obj-c++.dg/exceptions-5.mm
+++ b/gcc/testsuite/obj-c++.dg/exceptions-5.mm
@@ -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. */
diff --git a/gcc/testsuite/obj-c++.dg/extern-c-1.mm b/gcc/testsuite/obj-c++.dg/extern-c-1.mm
index c5fec6f..8b9147a 100644
--- a/gcc/testsuite/obj-c++.dg/extern-c-1.mm
+++ b/gcc/testsuite/obj-c++.dg/extern-c-1.mm
@@ -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>
diff --git a/gcc/testsuite/obj-c++.dg/fobjc-std-1.mm b/gcc/testsuite/obj-c++.dg/fobjc-std-1.mm
index 59db950..f7f4a19 100644
--- a/gcc/testsuite/obj-c++.dg/fobjc-std-1.mm
+++ b/gcc/testsuite/obj-c++.dg/fobjc-std-1.mm
@@ -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>
diff --git a/gcc/testsuite/obj-c++.dg/gnu-api-2-class-meta.mm b/gcc/testsuite/obj-c++.dg/gnu-api-2-class-meta.mm
index bdaef98..92852c3 100644
--- a/gcc/testsuite/obj-c++.dg/gnu-api-2-class-meta.mm
+++ b/gcc/testsuite/obj-c++.dg/gnu-api-2-class-meta.mm
@@ -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. */
diff --git a/gcc/testsuite/obj-c++.dg/gnu-api-2-class.mm b/gcc/testsuite/obj-c++.dg/gnu-api-2-class.mm
index ae39026..f6e3d8d 100644
--- a/gcc/testsuite/obj-c++.dg/gnu-api-2-class.mm
+++ b/gcc/testsuite/obj-c++.dg/gnu-api-2-class.mm
@@ -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. */
diff --git a/gcc/testsuite/obj-c++.dg/gnu-api-2-ivar.mm b/gcc/testsuite/obj-c++.dg/gnu-api-2-ivar.mm
index 1c85d23..991edc7 100644
--- a/gcc/testsuite/obj-c++.dg/gnu-api-2-ivar.mm
+++ b/gcc/testsuite/obj-c++.dg/gnu-api-2-ivar.mm
@@ -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. */
diff --git a/gcc/testsuite/obj-c++.dg/gnu-api-2-method.mm b/gcc/testsuite/obj-c++.dg/gnu-api-2-method.mm
index 97bf84b..07c3a22 100644
--- a/gcc/testsuite/obj-c++.dg/gnu-api-2-method.mm
+++ b/gcc/testsuite/obj-c++.dg/gnu-api-2-method.mm
@@ -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. */
diff --git a/gcc/testsuite/obj-c++.dg/gnu-api-2-objc.mm b/gcc/testsuite/obj-c++.dg/gnu-api-2-objc.mm
index 201ab7e..e68e7a8 100644
--- a/gcc/testsuite/obj-c++.dg/gnu-api-2-objc.mm
+++ b/gcc/testsuite/obj-c++.dg/gnu-api-2-objc.mm
@@ -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. */
diff --git a/gcc/testsuite/obj-c++.dg/gnu-api-2-objc_msg_lookup.mm b/gcc/testsuite/obj-c++.dg/gnu-api-2-objc_msg_lookup.mm
index dcbf6d2..1fb56dc 100644
--- a/gcc/testsuite/obj-c++.dg/gnu-api-2-objc_msg_lookup.mm
+++ b/gcc/testsuite/obj-c++.dg/gnu-api-2-objc_msg_lookup.mm
@@ -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. */
diff --git a/gcc/testsuite/obj-c++.dg/gnu-api-2-object.mm b/gcc/testsuite/obj-c++.dg/gnu-api-2-object.mm
index a2702d6..4d99053 100644
--- a/gcc/testsuite/obj-c++.dg/gnu-api-2-object.mm
+++ b/gcc/testsuite/obj-c++.dg/gnu-api-2-object.mm
@@ -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. */
diff --git a/gcc/testsuite/obj-c++.dg/gnu-api-2-property.mm b/gcc/testsuite/obj-c++.dg/gnu-api-2-property.mm
index 953e9bb..601f39f 100644
--- a/gcc/testsuite/obj-c++.dg/gnu-api-2-property.mm
+++ b/gcc/testsuite/obj-c++.dg/gnu-api-2-property.mm
@@ -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. */
diff --git a/gcc/testsuite/obj-c++.dg/gnu-api-2-protocol.mm b/gcc/testsuite/obj-c++.dg/gnu-api-2-protocol.mm
index 9a2ceca..21ae06b 100644
--- a/gcc/testsuite/obj-c++.dg/gnu-api-2-protocol.mm
+++ b/gcc/testsuite/obj-c++.dg/gnu-api-2-protocol.mm
@@ -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. */
diff --git a/gcc/testsuite/obj-c++.dg/gnu-api-2-resolve-method.mm b/gcc/testsuite/obj-c++.dg/gnu-api-2-resolve-method.mm
index f8a54d3..dc311324 100644
--- a/gcc/testsuite/obj-c++.dg/gnu-api-2-resolve-method.mm
+++ b/gcc/testsuite/obj-c++.dg/gnu-api-2-resolve-method.mm
@@ -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. */
diff --git a/gcc/testsuite/obj-c++.dg/gnu-api-2-sel.mm b/gcc/testsuite/obj-c++.dg/gnu-api-2-sel.mm
index ff50058..dd8ff3e 100644
--- a/gcc/testsuite/obj-c++.dg/gnu-api-2-sel.mm
+++ b/gcc/testsuite/obj-c++.dg/gnu-api-2-sel.mm
@@ -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. */
diff --git a/gcc/testsuite/obj-c++.dg/invalid-method-2.mm b/gcc/testsuite/obj-c++.dg/invalid-method-2.mm
index e3a8ed1..8eee0ff 100644
--- a/gcc/testsuite/obj-c++.dg/invalid-method-2.mm
+++ b/gcc/testsuite/obj-c++.dg/invalid-method-2.mm
@@ -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. */
diff --git a/gcc/testsuite/obj-c++.dg/ivar-invalid-type-1.mm b/gcc/testsuite/obj-c++.dg/ivar-invalid-type-1.mm
index 4c1480a..974e919 100644
--- a/gcc/testsuite/obj-c++.dg/ivar-invalid-type-1.mm
+++ b/gcc/testsuite/obj-c++.dg/ivar-invalid-type-1.mm
@@ -1,4 +1,5 @@
/* { dg-do compile } */
+// { dg-additional-options "-Wno-objc-root-class" }
#include <objc/objc.h>
@interface MyRootClass
diff --git a/gcc/testsuite/obj-c++.dg/ivar-problem-1.mm b/gcc/testsuite/obj-c++.dg/ivar-problem-1.mm
index 4ed5afa..1736f9c 100644
--- a/gcc/testsuite/obj-c++.dg/ivar-problem-1.mm
+++ b/gcc/testsuite/obj-c++.dg/ivar-problem-1.mm
@@ -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,
diff --git a/gcc/testsuite/obj-c++.dg/lto/lto.exp b/gcc/testsuite/obj-c++.dg/lto/lto.exp
index 6ba5f9c..936872a 100644
--- a/gcc/testsuite/obj-c++.dg/lto/lto.exp
+++ b/gcc/testsuite/obj-c++.dg/lto/lto.exp
@@ -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.
diff --git a/gcc/testsuite/obj-c++.dg/lto/trivial-1_0.mm b/gcc/testsuite/obj-c++.dg/lto/trivial-1_0.mm
index 55f62f0..c3620c3 100644
--- a/gcc/testsuite/obj-c++.dg/lto/trivial-1_0.mm
+++ b/gcc/testsuite/obj-c++.dg/lto/trivial-1_0.mm
@@ -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) ;
diff --git a/gcc/testsuite/obj-c++.dg/method-1.mm b/gcc/testsuite/obj-c++.dg/method-1.mm
index 7317ae2..5bb851a 100644
--- a/gcc/testsuite/obj-c++.dg/method-1.mm
+++ b/gcc/testsuite/obj-c++.dg/method-1.mm
@@ -3,6 +3,7 @@
/* Author: Ziemowit Laski <zlaski@apple.com>. */
/* { dg-do compile } */
+// { dg-additional-options "-Wno-objc-root-class" }
#include <objc/objc.h>
diff --git a/gcc/testsuite/obj-c++.dg/method-12.mm b/gcc/testsuite/obj-c++.dg/method-12.mm
index 4546144..d3145ab 100644
--- a/gcc/testsuite/obj-c++.dg/method-12.mm
+++ b/gcc/testsuite/obj-c++.dg/method-12.mm
@@ -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>
diff --git a/gcc/testsuite/obj-c++.dg/method-18.mm b/gcc/testsuite/obj-c++.dg/method-18.mm
index 411caac..c753f33 100644
--- a/gcc/testsuite/obj-c++.dg/method-18.mm
+++ b/gcc/testsuite/obj-c++.dg/method-18.mm
@@ -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>
diff --git a/gcc/testsuite/obj-c++.dg/method-19.mm b/gcc/testsuite/obj-c++.dg/method-19.mm
index 225beca..a3b977e 100644
--- a/gcc/testsuite/obj-c++.dg/method-19.mm
+++ b/gcc/testsuite/obj-c++.dg/method-19.mm
@@ -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"
diff --git a/gcc/testsuite/obj-c++.dg/method-20.mm b/gcc/testsuite/obj-c++.dg/method-20.mm
index 9698225..a7fe41d 100644
--- a/gcc/testsuite/obj-c++.dg/method-20.mm
+++ b/gcc/testsuite/obj-c++.dg/method-20.mm
@@ -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;
diff --git a/gcc/testsuite/obj-c++.dg/method-3.mm b/gcc/testsuite/obj-c++.dg/method-3.mm
index 9dab8c5..17b0c99 100644
--- a/gcc/testsuite/obj-c++.dg/method-3.mm
+++ b/gcc/testsuite/obj-c++.dg/method-3.mm
@@ -3,6 +3,7 @@
/* { dg-do compile } */
/* { dg-options "-Wno-strict-selector-match" } */
+// { dg-additional-options "-Wno-objc-root-class" }
#include <objc/objc.h>
diff --git a/gcc/testsuite/obj-c++.dg/method-4.mm b/gcc/testsuite/obj-c++.dg/method-4.mm
index e94f8f1..1f2f93e 100644
--- a/gcc/testsuite/obj-c++.dg/method-4.mm
+++ b/gcc/testsuite/obj-c++.dg/method-4.mm
@@ -3,6 +3,7 @@
/* { dg-do compile } */
/* { dg-options "-Wstrict-selector-match" } */
+// { dg-additional-options "-Wno-objc-root-class" }
#include <objc/objc.h>
diff --git a/gcc/testsuite/obj-c++.dg/method-5.mm b/gcc/testsuite/obj-c++.dg/method-5.mm
index 17c841a4..10364cc 100644
--- a/gcc/testsuite/obj-c++.dg/method-5.mm
+++ b/gcc/testsuite/obj-c++.dg/method-5.mm
@@ -3,6 +3,7 @@
/* { dg-do compile } */
/* { dg-options "-Wno-strict-selector-match" } */
+// { dg-additional-options "-Wno-objc-root-class" }
#include <objc/objc.h>
diff --git a/gcc/testsuite/obj-c++.dg/method-8.mm b/gcc/testsuite/obj-c++.dg/method-8.mm
index cde1bc2..9c5c17a 100644
--- a/gcc/testsuite/obj-c++.dg/method-8.mm
+++ b/gcc/testsuite/obj-c++.dg/method-8.mm
@@ -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" } */
diff --git a/gcc/testsuite/obj-c++.dg/method-9.mm b/gcc/testsuite/obj-c++.dg/method-9.mm
index 787e25d..bee076e 100644
--- a/gcc/testsuite/obj-c++.dg/method-9.mm
+++ b/gcc/testsuite/obj-c++.dg/method-9.mm
@@ -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;
diff --git a/gcc/testsuite/obj-c++.dg/method-namespace-1.mm b/gcc/testsuite/obj-c++.dg/method-namespace-1.mm
index 6095f57..86006a7 100644
--- a/gcc/testsuite/obj-c++.dg/method-namespace-1.mm
+++ b/gcc/testsuite/obj-c++.dg/method-namespace-1.mm
@@ -1,5 +1,6 @@
/* Test for usage of namespace inside @implementation. */
/* { dg-do compile } */
+// { dg-additional-options "-Wno-objc-root-class" }
@interface MyDocument
@end
diff --git a/gcc/testsuite/obj-c++.dg/plugin/diagnostic-test-expressions-1.mm b/gcc/testsuite/obj-c++.dg/plugin/diagnostic-test-expressions-1.mm
index 988b290..128b3bd 100644
--- a/gcc/testsuite/obj-c++.dg/plugin/diagnostic-test-expressions-1.mm
+++ b/gcc/testsuite/obj-c++.dg/plugin/diagnostic-test-expressions-1.mm
@@ -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
diff --git a/gcc/testsuite/obj-c++.dg/pr23709.mm b/gcc/testsuite/obj-c++.dg/pr23709.mm
index 018b53a..7936956 100644
--- a/gcc/testsuite/obj-c++.dg/pr23709.mm
+++ b/gcc/testsuite/obj-c++.dg/pr23709.mm
@@ -1,4 +1,5 @@
/* { dg-do compile } */
+// { dg-additional-options "-Wno-objc-root-class" }
@interface A
+(void)method: (int)parameter {} /* { dg-error "expected" } */
diff --git a/gcc/testsuite/obj-c++.dg/pragma-2.mm b/gcc/testsuite/obj-c++.dg/pragma-2.mm
index 14c4d79..09feac7 100644
--- a/gcc/testsuite/obj-c++.dg/pragma-2.mm
+++ b/gcc/testsuite/obj-c++.dg/pragma-2.mm
@@ -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
{
diff --git a/gcc/testsuite/obj-c++.dg/private-1.mm b/gcc/testsuite/obj-c++.dg/private-1.mm
index 0c25aea..2173b90 100644
--- a/gcc/testsuite/obj-c++.dg/private-1.mm
+++ b/gcc/testsuite/obj-c++.dg/private-1.mm
@@ -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
diff --git a/gcc/testsuite/obj-c++.dg/private-2.mm b/gcc/testsuite/obj-c++.dg/private-2.mm
index 3e6ff11..93b8a8f 100644
--- a/gcc/testsuite/obj-c++.dg/private-2.mm
+++ b/gcc/testsuite/obj-c++.dg/private-2.mm
@@ -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>
diff --git a/gcc/testsuite/obj-c++.dg/property/property.exp b/gcc/testsuite/obj-c++.dg/property/property.exp
index d18f610..31e683c 100644
--- a/gcc/testsuite/obj-c++.dg/property/property.exp
+++ b/gcc/testsuite/obj-c++.dg/property/property.exp
@@ -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.
diff --git a/gcc/testsuite/obj-c++.dg/proto-lossage-1.mm b/gcc/testsuite/obj-c++.dg/proto-lossage-1.mm
index 2f7eb98..82cd053 100644
--- a/gcc/testsuite/obj-c++.dg/proto-lossage-1.mm
+++ b/gcc/testsuite/obj-c++.dg/proto-lossage-1.mm
@@ -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;
diff --git a/gcc/testsuite/obj-c++.dg/proto-lossage-5.mm b/gcc/testsuite/obj-c++.dg/proto-lossage-5.mm
index 35c0956..2a30bc2 100644
--- a/gcc/testsuite/obj-c++.dg/proto-lossage-5.mm
+++ b/gcc/testsuite/obj-c++.dg/proto-lossage-5.mm
@@ -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;
diff --git a/gcc/testsuite/obj-c++.dg/proto-qual-1.mm b/gcc/testsuite/obj-c++.dg/proto-qual-1.mm
index 7ef0e9a..b235064 100644
--- a/gcc/testsuite/obj-c++.dg/proto-qual-1.mm
+++ b/gcc/testsuite/obj-c++.dg/proto-qual-1.mm
@@ -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>
diff --git a/gcc/testsuite/obj-c++.dg/protocol-inheritance-1.mm b/gcc/testsuite/obj-c++.dg/protocol-inheritance-1.mm
index 5241b29..c505c00 100644
--- a/gcc/testsuite/obj-c++.dg/protocol-inheritance-1.mm
+++ b/gcc/testsuite/obj-c++.dg/protocol-inheritance-1.mm
@@ -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>
diff --git a/gcc/testsuite/obj-c++.dg/protocol-inheritance-2.mm b/gcc/testsuite/obj-c++.dg/protocol-inheritance-2.mm
index 74c9174..f2bc1ca 100644
--- a/gcc/testsuite/obj-c++.dg/protocol-inheritance-2.mm
+++ b/gcc/testsuite/obj-c++.dg/protocol-inheritance-2.mm
@@ -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>
diff --git a/gcc/testsuite/obj-c++.dg/protocol-optional-1.mm b/gcc/testsuite/obj-c++.dg/protocol-optional-1.mm
index bc4a3d0..4ecf436 100644
--- a/gcc/testsuite/obj-c++.dg/protocol-optional-1.mm
+++ b/gcc/testsuite/obj-c++.dg/protocol-optional-1.mm
@@ -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>
diff --git a/gcc/testsuite/obj-c++.dg/selector-1.mm b/gcc/testsuite/obj-c++.dg/selector-1.mm
index d34f8c8..b0cdc9c 100644
--- a/gcc/testsuite/obj-c++.dg/selector-1.mm
+++ b/gcc/testsuite/obj-c++.dg/selector-1.mm
@@ -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;
diff --git a/gcc/testsuite/obj-c++.dg/selector-2.mm b/gcc/testsuite/obj-c++.dg/selector-2.mm
index 840ee19..fa9ab41 100644
--- a/gcc/testsuite/obj-c++.dg/selector-2.mm
+++ b/gcc/testsuite/obj-c++.dg/selector-2.mm
@@ -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>
diff --git a/gcc/testsuite/obj-c++.dg/selector-3.mm b/gcc/testsuite/obj-c++.dg/selector-3.mm
index a1321a7..0c98056 100644
--- a/gcc/testsuite/obj-c++.dg/selector-3.mm
+++ b/gcc/testsuite/obj-c++.dg/selector-3.mm
@@ -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;
diff --git a/gcc/testsuite/obj-c++.dg/selector-4.mm b/gcc/testsuite/obj-c++.dg/selector-4.mm
index 690cc44..b6ddcbe 100644
--- a/gcc/testsuite/obj-c++.dg/selector-4.mm
+++ b/gcc/testsuite/obj-c++.dg/selector-4.mm
@@ -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;
diff --git a/gcc/testsuite/obj-c++.dg/strings/strings.exp b/gcc/testsuite/obj-c++.dg/strings/strings.exp
index 1bfb3be..0243f24 100644
--- a/gcc/testsuite/obj-c++.dg/strings/strings.exp
+++ b/gcc/testsuite/obj-c++.dg/strings/strings.exp
@@ -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.
diff --git a/gcc/testsuite/obj-c++.dg/stubify-1.mm b/gcc/testsuite/obj-c++.dg/stubify-1.mm
index a32e282..21de463 100644
--- a/gcc/testsuite/obj-c++.dg/stubify-1.mm
+++ b/gcc/testsuite/obj-c++.dg/stubify-1.mm
@@ -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 ;
diff --git a/gcc/testsuite/obj-c++.dg/stubify-2.mm b/gcc/testsuite/obj-c++.dg/stubify-2.mm
index 69fea8d..cbc52b1 100644
--- a/gcc/testsuite/obj-c++.dg/stubify-2.mm
+++ b/gcc/testsuite/obj-c++.dg/stubify-2.mm
@@ -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 ;
diff --git a/gcc/testsuite/obj-c++.dg/super-dealloc-1.mm b/gcc/testsuite/obj-c++.dg/super-dealloc-1.mm
index 0ab177b..39ddd01 100644
--- a/gcc/testsuite/obj-c++.dg/super-dealloc-1.mm
+++ b/gcc/testsuite/obj-c++.dg/super-dealloc-1.mm
@@ -2,6 +2,7 @@
/* Author: Ziemowit Laski <zlaski@apple.com> */
/* { dg-do compile } */
+// { dg-additional-options "-Wno-objc-root-class" }
@interface Foo {
void *isa;
diff --git a/gcc/testsuite/obj-c++.dg/super-dealloc-2.mm b/gcc/testsuite/obj-c++.dg/super-dealloc-2.mm
index 80dcf49..6dac31c 100644
--- a/gcc/testsuite/obj-c++.dg/super-dealloc-2.mm
+++ b/gcc/testsuite/obj-c++.dg/super-dealloc-2.mm
@@ -2,6 +2,7 @@
/* Author: Ziemowit Laski <zlaski@apple.com> */
/* { dg-do compile } */
+// { dg-additional-options "-Wno-objc-root-class" }
@interface Foo {
void *isa;
diff --git a/gcc/testsuite/obj-c++.dg/sync-3.mm b/gcc/testsuite/obj-c++.dg/sync-3.mm
index 95def43..2949d6a 100644
--- a/gcc/testsuite/obj-c++.dg/sync-3.mm
+++ b/gcc/testsuite/obj-c++.dg/sync-3.mm
@@ -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. */
diff --git a/gcc/testsuite/obj-c++.dg/syntax-error-2.mm b/gcc/testsuite/obj-c++.dg/syntax-error-2.mm
index ba8804a..bf4d5ff 100644
--- a/gcc/testsuite/obj-c++.dg/syntax-error-2.mm
+++ b/gcc/testsuite/obj-c++.dg/syntax-error-2.mm
@@ -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." } */
diff --git a/gcc/testsuite/obj-c++.dg/syntax-error-4.mm b/gcc/testsuite/obj-c++.dg/syntax-error-4.mm
index 0df0618..97587f9 100644
--- a/gcc/testsuite/obj-c++.dg/syntax-error-4.mm
+++ b/gcc/testsuite/obj-c++.dg/syntax-error-4.mm
@@ -1,5 +1,6 @@
/* Yet another stray infinite loop... */
/* { dg-do compile } */
+// { dg-additional-options "-Wno-objc-root-class" }
@interface t
{
diff --git a/gcc/testsuite/obj-c++.dg/syntax-error-7.mm b/gcc/testsuite/obj-c++.dg/syntax-error-7.mm
index 5bdccc7..c406d8f 100644
--- a/gcc/testsuite/obj-c++.dg/syntax-error-7.mm
+++ b/gcc/testsuite/obj-c++.dg/syntax-error-7.mm
@@ -1,4 +1,5 @@
/* { dg-do compile } */
+// { dg-additional-options "-Wno-objc-root-class" }
@interface Foo
-(void) someMethod;
diff --git a/gcc/testsuite/obj-c++.dg/syntax-error-9.mm b/gcc/testsuite/obj-c++.dg/syntax-error-9.mm
index 1876c32..ad8837c 100644
--- a/gcc/testsuite/obj-c++.dg/syntax-error-9.mm
+++ b/gcc/testsuite/obj-c++.dg/syntax-error-9.mm
@@ -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 } */
diff --git a/gcc/testsuite/obj-c++.dg/template-4.mm b/gcc/testsuite/obj-c++.dg/template-4.mm
index 5301df5..02795e7 100644
--- a/gcc/testsuite/obj-c++.dg/template-4.mm
+++ b/gcc/testsuite/obj-c++.dg/template-4.mm
@@ -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>
diff --git a/gcc/testsuite/obj-c++.dg/template-7.mm b/gcc/testsuite/obj-c++.dg/template-7.mm
index 8621abe..b3697a5 100644
--- a/gcc/testsuite/obj-c++.dg/template-7.mm
+++ b/gcc/testsuite/obj-c++.dg/template-7.mm
@@ -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
diff --git a/gcc/testsuite/obj-c++.dg/template-8.mm b/gcc/testsuite/obj-c++.dg/template-8.mm
index df215b8..1b9f4d1 100644
--- a/gcc/testsuite/obj-c++.dg/template-8.mm
+++ b/gcc/testsuite/obj-c++.dg/template-8.mm
@@ -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>
diff --git a/gcc/testsuite/obj-c++.dg/threedotthree-abi-1.mm b/gcc/testsuite/obj-c++.dg/threedotthree-abi-1.mm
index c481810..32f4fd8 100644
--- a/gcc/testsuite/obj-c++.dg/threedotthree-abi-1.mm
+++ b/gcc/testsuite/obj-c++.dg/threedotthree-abi-1.mm
@@ -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>
diff --git a/gcc/testsuite/obj-c++.dg/torture/dg-torture.exp b/gcc/testsuite/obj-c++.dg/torture/dg-torture.exp
index c3d3f8e..4e46207 100644
--- a/gcc/testsuite/obj-c++.dg/torture/dg-torture.exp
+++ b/gcc/testsuite/obj-c++.dg/torture/dg-torture.exp
@@ -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
diff --git a/gcc/testsuite/obj-c++.dg/torture/strings/strings.exp b/gcc/testsuite/obj-c++.dg/torture/strings/strings.exp
index 401bc58..6181c30 100644
--- a/gcc/testsuite/obj-c++.dg/torture/strings/strings.exp
+++ b/gcc/testsuite/obj-c++.dg/torture/strings/strings.exp
@@ -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
diff --git a/gcc/testsuite/obj-c++.dg/try-catch-12.mm b/gcc/testsuite/obj-c++.dg/try-catch-12.mm
index e08f321..6a60805 100644
--- a/gcc/testsuite/obj-c++.dg/try-catch-12.mm
+++ b/gcc/testsuite/obj-c++.dg/try-catch-12.mm
@@ -4,6 +4,7 @@
/* { dg-options "-fobjc-exceptions" } */
/* { dg-do compile } */
+// { dg-additional-options "-Wno-objc-root-class" }
typedef volatile int IOSharedLockData;
diff --git a/gcc/testsuite/obj-c++.dg/try-catch-13.mm b/gcc/testsuite/obj-c++.dg/try-catch-13.mm
index 050d811..0e6f01b 100644
--- a/gcc/testsuite/obj-c++.dg/try-catch-13.mm
+++ b/gcc/testsuite/obj-c++.dg/try-catch-13.mm
@@ -4,6 +4,7 @@
/* { dg-options "-fobjc-exceptions" } */
/* { dg-do compile } */
+// { dg-additional-options "-Wno-objc-root-class" }
@interface TestMyTests
- (void) testSpoon;