+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
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)
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.
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;
}