[darwin] nullify __strong/__weak for non-Objc-gc case.

Submitted by IainS on Sept. 30, 2010, 2:55 p.m.


Message ID CE59B962-EE55-4B98-A64A-E2EC6C683A20@sandoe-acoustics.co.uk
State New
Headers show

Commit Message

IainS Sept. 30, 2010, 2:55 p.m.

We don't (yet) support gc for NeXT ObjC (that's a V2 ABI thing).
So we should ignore the strong/weak tags (which is what the V2  
compiler does when gc is off).

tested on i686-darwin9.

OK for trunk?


	config/darwin-c.c (darwin_cpp_builtins): Define __strong and __weak  
to null.

  /* Handle C family front-end options.  */

Patch hide | download patch | download mbox

Index: gcc/config/darwin-c.c
--- gcc/config/darwin-c.c	(revision 164748)
+++ gcc/config/darwin-c.c	(working copy)
@@ -610,6 +610,14 @@  darwin_cpp_builtins (cpp_reader *pfile)

  			     version_as_macro(), false);
+  /* Since we do not (yet, 4.6) support ObjC gc for the NeXT runtime,  
+     following defines apply unconditionally.  Without this NeXT system
+     headers cannot be parsed properly.  */
+  {
+    builtin_define ("__strong=");
+    builtin_define ("__weak=");
+  }