This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Add a predefined symbol __NEXT_RUNTIME__ to ObjC

> One of the little peculiarities of GNU Objective-C is that it supports
> two incompatible runtimes, the original "NeXT" runtime, and a later
> workalike called the "GNU" runtime.  The two runtimes actually have
> different user-visible API, and it's been a longstanding wishlist
> item to provide a way for source code to know which is in use.  This
> patch does that by using all the nice new predefine mechy to define a
> __NEXT_RUNTIME__ macro, and includes a sample usage in one of the test
> cases that has been failing on Darwin for some time.

I quite like this patch - I'd be happy to see it applied :-)

>   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

Just to make it overly clear, I'd add the final sentence "It is not
defined if the GNU runtime is in use.  "

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]