/* { 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. */
/* { dg-do compile } */
+/* { dg-additional-options "-Wno-objc-root-class" } */
#include <objc/objc.h>
/* 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. */
/* 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>
/* 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>
/* 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>
/* 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>
/* 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>
/* 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>
/* 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>
/* 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;
/* 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>
/* Test that we get warnings for unrecognized attributes. */
/* { dg-do compile } */
+/* { dg-additional-options "-Wno-objc-root-class" } */
#include <objc/objc.h>
/* { dg-do compile } */
+/* { dg-additional-options "-Wno-objc-root-class" } */
#include <objc/objc.h>
/* 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. */
/* 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. */
/* { dg-do compile } */
+/* { dg-additional-options "-Wno-objc-root-class" } */
#include <objc/objc.h>
// { dg-do compile }
// { dg-options "" }
+// { dg-additional-options "-Wno-objc-root-class" }
@interface A
/* { 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;
(@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;
/* 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. */
/* 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. */
/* 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. */
/* 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. */
/* 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"
/* { dg-do compile } */
+// { dg-additional-options "-Wno-objc-root-class" }
@interface A
+ new;
/* { dg-do compile } */
/* { dg-prune-output ".*internal compiler error.*" } */
/* { dg-options "-O3" } */
+// { dg-additional-options "-Wno-objc-root-class" }
@class NSString;
@protocol NSObject
/* 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>
/* 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>
/* 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>
/* 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>
/* 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>
/* { 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]. */
/* 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>
/* 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>
/* 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. */
/* { dg-do compile } */
/* { dg-skip-if "" { *-*-* } { "-fgnu-runtime" } { "" } } */
+// { dg-additional-options "-Wno-objc-root-class" }
struct Cxx {
const struct Cxx *next;
/* { dg-do compile } */
/* { dg-skip-if "" { *-*-* } { "-fnext-runtime" } { "" } } */
+// { dg-additional-options "-Wno-objc-root-class" }
struct Cxx {
const struct Cxx *next;
/* { dg-do compile } */
+// { dg-additional-options "-Wno-objc-root-class" }
@protocol MyProto1
@optional
/* 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
/* 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. */
/* 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(). */
/* 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. */
/* Test extern c support inside @implementation */
/* Devang Patel <dpatel@apple.com>. */
+// { dg-additional-options "-Wno-objc-root-class" }
#include <objc/objc.h>
/* 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>
/* { 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. */
/* { 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. */
/* { 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. */
/* { 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. */
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. */
/* { 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. */
/* { 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. */
/* { 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. */
/* { 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. */
/* { 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. */
/* { 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. */
/* { 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. */
/* { dg-do compile } */
+// { dg-additional-options "-Wno-objc-root-class" }
#include <objc/objc.h>
@interface MyRootClass
/* 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,
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
# 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.
/* { dg-lto-do run } */
-/* { dg-skip-if "Needs OBJC2 ABI" { "*-*-darwin*" && lp64 } } */
+
extern "C" {
extern int printf (const char *,...) ;
extern void abort (void) ;
/* Author: Ziemowit Laski <zlaski@apple.com>. */
/* { dg-do compile } */
+// { dg-additional-options "-Wno-objc-root-class" }
#include <objc/objc.h>
/* { 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>
/* Contributed by Igor Seleznev <selez@mail.ru>. */
/* This used to be broken. */
+// { dg-additional-options "-Wno-objc-root-class" }
#include <objc/objc.h>
/* 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"
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;
/* { dg-do compile } */
/* { dg-options "-Wno-strict-selector-match" } */
+// { dg-additional-options "-Wno-objc-root-class" }
#include <objc/objc.h>
/* { dg-do compile } */
/* { dg-options "-Wstrict-selector-match" } */
+// { dg-additional-options "-Wno-objc-root-class" }
#include <objc/objc.h>
/* { dg-do compile } */
/* { dg-options "-Wno-strict-selector-match" } */
+// { dg-additional-options "-Wno-objc-root-class" }
#include <objc/objc.h>
/* Tests of duplication. */
/* { dg-do compile } */
+// { dg-additional-options "-Wno-objc-root-class" }
@interface class1
- (int) meth1; /* { dg-message "previous declaration" } */
/* 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;
/* Test for usage of namespace inside @implementation. */
/* { dg-do compile } */
+// { dg-additional-options "-Wno-objc-root-class" }
@interface MyDocument
@end
/* { 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
/* { dg-do compile } */
+// { dg-additional-options "-Wno-objc-root-class" }
@interface A
+(void)method: (int)parameter {} /* { dg-error "expected" } */
/* 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
{
/* 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
/* Based on work by: Nicola Pero <nicola@brainstorm.co.uk>. */
/* { dg-do compile } */
+// { dg-additional-options "-Wno-objc-root-class" }
#include <objc/objc.h>
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.
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;
/* Do not lose references to forward-declared protocols. */
/* { dg-do compile } */
+// { dg-additional-options "-Wno-objc-root-class" }
@class MyBaseClass;
@class MyClassThatFails;
@protocol _MyProtocol;
/* { 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>
/* 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>
/* 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>
/* 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>
/* 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;
/* 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>
/* 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;
/* { 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;
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.
/* { 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 ;
/* { 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 ;
/* Author: Ziemowit Laski <zlaski@apple.com> */
/* { dg-do compile } */
+// { dg-additional-options "-Wno-objc-root-class" }
@interface Foo {
void *isa;
/* Author: Ziemowit Laski <zlaski@apple.com> */
/* { dg-do compile } */
+// { dg-additional-options "-Wno-objc-root-class" }
@interface Foo {
void *isa;
/* 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. */
/* Recover gracefully from a syntax error. */
+// { dg-additional-options "-Wno-objc-root-class" }
@implementation Whatever /* { dg-warning "cannot find interface declaration for .Whatever." } */
/* Yet another stray infinite loop... */
/* { dg-do compile } */
+// { dg-additional-options "-Wno-objc-root-class" }
@interface t
{
/* { dg-do compile } */
+// { dg-additional-options "-Wno-objc-root-class" }
@interface Foo
-(void) someMethod;
+// { 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 } */
/* { 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>
// 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
/* { 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>
/* { 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>
# 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
# 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
/* { dg-options "-fobjc-exceptions" } */
/* { dg-do compile } */
+// { dg-additional-options "-Wno-objc-root-class" }
typedef volatile int IOSharedLockData;
/* { dg-options "-fobjc-exceptions" } */
/* { dg-do compile } */
+// { dg-additional-options "-Wno-objc-root-class" }
@interface TestMyTests
- (void) testSpoon;