From: Thomas Huth Date: Mon, 23 Apr 2018 17:40:51 +0000 (+0200) Subject: Fix NORETURN when GCC minor version is 0 X-Git-Tag: 4000~39^2^2~2 X-Git-Url: https://git.unchartedbackwaters.co.uk/w/?a=commitdiff_plain;h=14078f67daf6b42c53588c490789adee7cbf2146;p=francis%2Fwinuae.git 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. --- 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))