From 14078f67daf6b42c53588c490789adee7cbf2146 Mon Sep 17 00:00:00 2001 From: Thomas Huth Date: Mon, 23 Apr 2018 19:40:51 +0200 Subject: [PATCH] Fix NORETURN when GCC minor version is 0 The check currently tests if major > 2 && minor >= 1 (since the wanted attribute functions were likely available since GCC 3.1). That of course failing if a newer x.0 release of the compiler is used, like GCC 8.0. So let's fix the check to handle all newer compiler versions correctly. --- include/sysdeps.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/sysdeps.h b/include/sysdeps.h index 3c276c4a..8a6e6537 100644 --- a/include/sysdeps.h +++ b/include/sysdeps.h @@ -477,7 +477,7 @@ extern bool use_long_double; #endif #ifndef STATIC_INLINE -#if __GNUC__ - 1 > 1 && __GNUC_MINOR__ - 1 >= 0 +#if __GNUC__ - 1 > 2 || (__GNUC__ - 1 == 2 && __GNUC_MINOR__ - 1 >= 0) #define STATIC_INLINE static __inline__ __attribute__ ((always_inline)) #define NOINLINE __attribute__ ((noinline)) #define NORETURN __attribute__ ((noreturn)) -- 2.47.3