===================================================================
@@ -545,6 +545,13 @@ objc_init (void)
structure-returning methods. */
default_constant_string_class_name = "NXConstantString";
flag_typed_selectors = 1;
+ /* GNU runtime does not need the compiler to change code
+ in order to do GC. */
+ if (flag_objc_gc)
+ {
+ warning_at (0, 0, "%<-fobjc-gc%> is ignored for %<-fgnu-runtime%>");
+ flag_objc_gc=0;
+ }
}
init_objc ();
===================================================================
@@ -2,8 +2,9 @@
(where component references get rewritten). */
/* Contributed by Ziemowit Laski <zlaski@apple.com> */
-/* { dg-do compile { target *-*-darwin* } } */
+/* { dg-do compile } */
/* { dg-options "-fobjc-gc" } */
+/* { dg-prune-output "cc1obj: warning: '-fobjc-gc' is ignored for '-fgnu-runtime'" } */
#include "../objc-obj-c++-shared/Object1.h"
===================================================================
@@ -2,8 +2,9 @@
(where component references get rewritten). */
/* Contributed by Ziemowit Laski <zlaski@apple.com> */
-/* { dg-do compile { target *-*-darwin* } } */
+/* { dg-do compile } */
/* { dg-options "-fobjc-gc" } */
+/* { dg-prune-output "cc1objplus: warning: '-fobjc-gc' is ignored for '-fgnu-runtime'" } */
#include "../objc-obj-c++-shared/Object1.h"