diff options
author | Max Kellermann <max@duempel.org> | 2014-11-28 19:33:09 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2014-11-28 19:33:09 +0100 |
commit | 16a99ad515915f5bc9a4810c412488e966310774 (patch) | |
tree | cb95d5dd5302bb108fa1c29cdfe869d55b1a4c79 /src/Compiler.h | |
parent | d93172bee81ce18cd3ea4675907d204502d7ff49 (diff) | |
download | mpd-16a99ad515915f5bc9a4810c412488e966310774.tar.gz mpd-16a99ad515915f5bc9a4810c412488e966310774.tar.xz mpd-16a99ad515915f5bc9a4810c412488e966310774.zip |
Compiler.h: exclude clang from GCC_CHECK_VERSION()
Diffstat (limited to 'src/Compiler.h')
-rw-r--r-- | src/Compiler.h | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/Compiler.h b/src/Compiler.h index dc8393dbb..3b4e9c8dc 100644 --- a/src/Compiler.h +++ b/src/Compiler.h @@ -28,8 +28,13 @@ #define GCC_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) \ - (defined(__GNUC__) && GCC_VERSION >= GCC_MAKE_VERSION(major, minor, 0)) + (defined(__GNUC__) && !defined(__clang__) && \ + GCC_VERSION >= GCC_MAKE_VERSION(major, minor, 0)) /** * Are we building with clang (any version) or at least the specified @@ -131,7 +136,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 |