Commit 8aa5074e by Stan Shebs Committed by Stan Shebs

c-common.c (cb_register_builds): Define __NEXT_RUNTIME__ for ObjC with -fnext-runtime.

	* c-common.c (cb_register_builds): Define __NEXT_RUNTIME__
	for ObjC with -fnext-runtime.
	* doc/cpp.texi: Document it.

	* objc/execute/selector-1.m: Add __NEXT_RUNTIME__ case.

From-SVN: r56390
parent ca75573a
2002-08-16 Stan Shebs <shebs@apple.com>
* c-common.c (cb_register_builds): Define __NEXT_RUNTIME__
for ObjC with -fnext-runtime.
* doc/cpp.texi: Document it.
2002-08-16 Janis Johnson <janis187@us.ibm.com>
* doc/install.texi (Final installation): Replace links to individual
......
......@@ -4745,6 +4745,10 @@ cb_register_builtins (pfile)
if (!flag_signed_char)
cpp_define (pfile, "__CHAR_UNSIGNED__");
/* Make the choice of ObjC runtime visible to source code. */
if (flag_objc && flag_next_runtime)
cpp_define (pfile, "__NEXT_RUNTIME__");
/* A straightforward target hook doesn't work, because of problems
linking that hook's body when part of non-C front ends. */
# define preprocessing_asm_p() (cpp_get_options (pfile)->lang == CLK_ASM)
......
......@@ -2003,6 +2003,10 @@ the typedefs.
This macro is defined, with value 1, if the compiler uses the old
mechanism based on @code{setjmp} and @code{longjmp} for exception
handling.
@item __NEXT_RUNTIME__
This macro is defined, with value 1, when the NeXT runtime
(as in @option{-fnext-runtime}) is in use for Objective-C.
@end table
@node System-specific Predefined Macros
......
2002-08-16 Stan Shebs <shebs@apple.com>
* objc/execute/selector-1.m: Add __NEXT_RUNTIME__ case.
2002-08-15 Jakub Jelinek <jakub@redhat.com>
* gcc.dg/typeof-1.c: New test.
......
......@@ -6,12 +6,16 @@
int main (void)
{
SEL selector;
char *selname;
selector = @selector (alloc);
if (strcmp (sel_get_name (selector), "alloc"))
{
abort ();
}
#ifdef __NEXT_RUNTIME__
selname = sel_getName (selector);
#else
selname = sel_get_name (selector);
#endif
if (strcmp (selname, "alloc"))
abort ();
return 0;
}
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