diff options
author | Iain Sandoe <iains@gcc.gnu.org> | 2010-04-07 19:57:46 +0000 |
---|---|---|
committer | Iain Sandoe <iains@gcc.gnu.org> | 2010-04-07 19:57:46 +0000 |
commit | b51e84c954e63bc52a8d5d4fa1cda7cf4f8ecfb4 (patch) | |
tree | b48aaab80c9e77394e9238ab95418bfe5122215f /gcc/objc | |
parent | 927f4842615f6e1fd941b09b6a1c567b29afac15 (diff) | |
download | gcc-b51e84c954e63bc52a8d5d4fa1cda7cf4f8ecfb4.zip gcc-b51e84c954e63bc52a8d5d4fa1cda7cf4f8ecfb4.tar.gz gcc-b51e84c954e63bc52a8d5d4fa1cda7cf4f8ecfb4.tar.bz2 |
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
Diffstat (limited to 'gcc/objc')
-rw-r--r-- | gcc/objc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/objc/objc-act.c | 7 |
2 files changed, 13 insertions, 0 deletions
diff --git a/gcc/objc/ChangeLog b/gcc/objc/ChangeLog index 472d4aa..3063af9 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 7e3a2d8..f5b754b 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 (); |