[Patch, darwin] nullify __strong/__weak for non-Objc-gc case.
IainS
developer@sandoe-acoustics.co.uk
Thu Sep 30 18:05:00 GMT 2010
Hi,
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?
Iain
gcc
config/darwin-c.c (darwin_cpp_builtins): Define __strong and __weak
to null.
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)
builtin_define_with_value
("__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__",
version_as_macro(), false);
+
+ /* Since we do not (yet, 4.6) support ObjC gc for the NeXT runtime,
the
+ following defines apply unconditionally. Without this NeXT system
+ headers cannot be parsed properly. */
+ {
+ builtin_define ("__strong=");
+ builtin_define ("__weak=");
+ }
}
/* Handle C family front-end options. */
More information about the Gcc-patches
mailing list