From: Max Kellermann Date: Fri, 10 Mar 2017 20:39:42 +0000 (+0100) Subject: Compiler.h: exclude clang from GCC_CHECK_VERSION() X-Git-Tag: v0.26~75 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=a62b1b98ceb99456f25c1839a11d9d1f749d84c6;p=ncmpc.git Compiler.h: exclude clang from GCC_CHECK_VERSION() --- diff --git a/src/Compiler.h b/src/Compiler.h index d76c8f6..38c008f 100644 --- a/src/Compiler.h +++ b/src/Compiler.h @@ -34,8 +34,13 @@ # define CLANG_VERSION 0 #endif +/** + * Are we building with the specified version of gcc (not clang or any + * other compiler) or newer? + */ #define GCC_CHECK_VERSION(major, minor) \ - (GCC_VERSION >= GCC_MAKE_VERSION(major, minor, 0)) + (!CLANG_VERSION && \ + GCC_VERSION >= GCC_MAKE_VERSION(major, minor, 0)) /** * Are we building with clang (any version) or at least the specified @@ -124,7 +129,7 @@ #endif /* ! GCC_UNUSED >= 40300 */ -#if GCC_CHECK_VERSION(4,6) && !defined(__clang__) +#if GCC_CHECK_VERSION(4,6) #define gcc_flatten __attribute__((flatten)) #else #define gcc_flatten