summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gcc/objc/ChangeLog6
-rw-r--r--gcc/objc/objc-act.c7
-rw-r--r--gcc/testsuite/ChangeLog9
-rw-r--r--gcc/testsuite/obj-c++.dg/objc-gc-3.mm3
-rw-r--r--gcc/testsuite/objc.dg/objc-gc-4.m3
5 files changed, 25 insertions, 3 deletions
diff --git a/gcc/objc/ChangeLog b/gcc/objc/ChangeLog
index 472d4aa7ac6..3063af9f3af 100644
--- a/gcc/objc/ChangeLog
+++ b/gcc/objc/ChangeLog
@@ -1,5 +1,11 @@
2010-04-07 Iain Sandoe <iains@gcc.gnu.org>
+ PR objc/35996
+ * objc-act.c (objc_init): Warn that -fobjc-gc is ignored for
+ -fgnu-runtime and set flag_objc_gc to zero.
+
+2010-04-07 Iain Sandoe <iains@gcc.gnu.org>
+
PR objc++/23716
* objc-act.c (build_module_initializer_routine): Make the argument
to objc_start_function NULL_TREE when compiling ObjC++.
diff --git a/gcc/objc/objc-act.c b/gcc/objc/objc-act.c
index 7e3a2d86115..f5b754be723 100644
--- a/gcc/objc/objc-act.c
+++ b/gcc/objc/objc-act.c
@@ -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 ();
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 81684784874..5c313817f59 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,9 @@
+2010-04-07 Iain Sandoe <iains@gcc.gnu.org>
+
+ PR objc/35996
+ * objc.dg/objc-gc-4.m: Run for all targets, prune new warning.
+ * obj-c++.dg/objc-gc-3.mm: Ditto.
+
2010-04-07 Simon Baldwin <simonb@google.com>
* gcc.dg/cpp/warn-undef-2.c: New.
@@ -41,7 +47,8 @@
* gfortran.dg/warning-directive-4.F90: New.
2010-04-07 Iain Sandoe <iains@gcc.gnu.org>
-PR objc++/23716
+
+ PR objc++/23716
* obj-c++.dg/comp-types-10.mm: Remove XFAIL.
2010-04-07 Jason Merrill <jason@redhat.com>
diff --git a/gcc/testsuite/obj-c++.dg/objc-gc-3.mm b/gcc/testsuite/obj-c++.dg/objc-gc-3.mm
index efbde1b4b2a..c0249e7a962 100644
--- a/gcc/testsuite/obj-c++.dg/objc-gc-3.mm
+++ b/gcc/testsuite/obj-c++.dg/objc-gc-3.mm
@@ -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"
diff --git a/gcc/testsuite/objc.dg/objc-gc-4.m b/gcc/testsuite/objc.dg/objc-gc-4.m
index efbde1b4b2a..097f35e9f25 100644
--- a/gcc/testsuite/objc.dg/objc-gc-4.m
+++ b/gcc/testsuite/objc.dg/objc-gc-4.m
@@ -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"