This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc 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: [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:

#ifndef _Noreturn
# if (3 <= __GNUC__ || (__GNUC__ == 2 && 8 <= __GNUC_MINOR__) \
      || 0x5110 <= __SUNPRO_C)
#  define _Noreturn __attribute__ ((__noreturn__))
# elif 1200 <= _MSC_VER
#  define _Noreturn __declspec (noreturn)
# else
#  define _Noreturn
# endif
#endif


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