re PR objc/35996 (ICE while building simple ObjC code with -fobjc-gc)

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
This commit is contained in:
Iain Sandoe 2010-04-07 19:57:46 +00:00
parent 927f484261
commit b51e84c954
5 changed files with 25 additions and 3 deletions

View 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

View 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 ();

View 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>

View 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"

View 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"