]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR objc/35996 (ICE while building simple ObjC code with -fobjc-gc)
authorIain Sandoe <iains@gcc.gnu.org>
Wed, 7 Apr 2010 19:57:46 +0000 (19:57 +0000)
committerIain Sandoe <iains@gcc.gnu.org>
Wed, 7 Apr 2010 19:57:46 +0000 (19:57 +0000)
gcc/objc/Changelog:
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.

testsuite:
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.

From-SVN: r158083

gcc/objc/ChangeLog
gcc/objc/objc-act.c
gcc/testsuite/ChangeLog
gcc/testsuite/obj-c++.dg/objc-gc-3.mm
gcc/testsuite/objc.dg/objc-gc-4.m

index 472d4aa7ac63dec1bb6322b0a1b0a67db1e0c461..3063af9f3af2cec457533f0f1cf342fa9b8b03c4 100644 (file)
@@ -1,3 +1,9 @@
+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
index 7e3a2d86115f34109b2c5f0300875e2964af927f..f5b754be7239286c5a1d8b0e71b62d56345a04cb 100644 (file)
@@ -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 ();
index 816847848746b8150db3f7505483d62f28b72f92..5c313817f59e67452849ced78d3569a03a0f8f68 100644 (file)
@@ -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>
index efbde1b4b2a9e0d809d0cbab0f501bee726ee0fb..c0249e7a96229bf7291136831460662179ece2a1 100644 (file)
@@ -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"
 
index efbde1b4b2a9e0d809d0cbab0f501bee726ee0fb..097f35e9f2512591e4f2d63907a677f33ef83dd2 100644 (file)
@@ -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"