This is the mail archive of the
mailing list for the glibc project.
Re: [PATCH] Add a few noreturn keywords
On 01/23/2012 01:55 PM, Joseph S. Myers wrote:
> I don't think versions before 2.7 are relevant for using glibc's headers, however
> (except maybe for the versions of any headers that are also used in gnulib)
It shouldn't be a problem for gnulib, as Gnulib uses _Noreturn,
and arranges for _Noreturn to be #defined appropriately
on pre-2.8 GCC and other pre-C11 platforms.
Here's Gnulib's current implementation of that:
# if (3 <= __GNUC__ || (__GNUC__ == 2 && 8 <= __GNUC_MINOR__) \
|| 0x5110 <= __SUNPRO_C)
# define _Noreturn __attribute__ ((__noreturn__))
# elif 1200 <= _MSC_VER
# define _Noreturn __declspec (noreturn)
# define _Noreturn