Commit 560d6bd5 by Iain Sandoe

Partial merge of 'ObjC GC' from FSF apple 'trunk' branch.

	* config/darwin-c.c (darwin_cpp_builtins): Define __weak and
	__strong macros.

From-SVN: r165469
parent a61c3633
2010-10-14 Iain Sandoe <iains@gcc.gnu.org>
Partial merge of 'ObjC GC' from FSF apple 'trunk' branch.
* config/darwin-c.c (darwin_cpp_builtins): Define __weak and
__strong macros.
2010-10-14 Eric Botcazou <ebotcazou@adacore.com> 2010-10-14 Eric Botcazou <ebotcazou@adacore.com>
* sched-deps.c (sched_insn_is_legitimate_for_speculation): Invoke * sched-deps.c (sched_insn_is_legitimate_for_speculation): Invoke
...@@ -610,6 +610,22 @@ darwin_cpp_builtins (cpp_reader *pfile) ...@@ -610,6 +610,22 @@ darwin_cpp_builtins (cpp_reader *pfile)
builtin_define_with_value ("__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__", builtin_define_with_value ("__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__",
version_as_macro(), false); version_as_macro(), false);
/* Since we do not (at 4.6) support ObjC gc for the NeXT runtime, the
following will cause a syntax error if one tries to compile gc attributed
items. However, without this, NeXT system headers cannot be parsed
properly (on systems >= darwin 9). */
if (flag_objc_gc)
{
builtin_define ("__strong=__attribute__((objc_gc(strong)))");
builtin_define ("__weak=__attribute__((objc_gc(weak)))");
builtin_define ("__OBJC_GC__");
}
else
{
builtin_define ("__strong=");
builtin_define ("__weak=");
}
} }
/* Handle C family front-end options. */ /* Handle C family front-end options. */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment