From: Alejandro Colomar Date: Thu, 7 Aug 2025 12:29:43 +0000 (+0200) Subject: lib/attr.h: NORETURN: Implement with [[noreturn]] X-Git-Tag: 4.19.0-rc1~83 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=4500013326dfbd5d2366f5f0b7c86f87b5dc83fc;p=thirdparty%2Fshadow.git lib/attr.h: NORETURN: Implement with [[noreturn]] This is a C23 standard attribute with the same semantics. Signed-off-by: Alejandro Colomar --- diff --git a/lib/attr.h b/lib/attr.h index 7d1bf3755..a77e3e35f 100644 --- a/lib/attr.h +++ b/lib/attr.h @@ -16,13 +16,17 @@ # define MAYBE_UNUSED #endif +#if __has_c_attribute(noreturn) +# define NORETURN [[noreturn]] +#else +# define NORETURN +#endif + #if (__GNUC__ >= 10) -# define NORETURN [[gnu::__noreturn__]] # define format_attr(type, fmt, va) [[gnu::format(type, fmt, va)]] # define ATTR_ACCESS(...) [[gnu::access(__VA_ARGS__)]] # define ATTR_ALLOC_SIZE(...) [[gnu::alloc_size(__VA_ARGS__)]] #else -# define NORETURN # define format_attr(type, fmt, va) # define ATTR_ACCESS(...) # define ATTR_ALLOC_SIZE(...)