diff options
author | Max Kellermann <max@duempel.org> | 2014-11-28 19:06:17 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2014-12-26 13:30:22 +0100 |
commit | 92eeca3ba77446b760d3d64d9c50a08029bd4500 (patch) | |
tree | e26acc27b254389de25f8346951c64b9cf93ef77 /src/Compiler.h | |
parent | 2a86554ac452fff2ee3c279ceb792fbd3449d448 (diff) |
util/Manual: reimplement GCC_CHECK_VERSION() using GCC_MAKE_VERSION()
Diffstat (limited to 'src/Compiler.h')
-rw-r--r-- | src/Compiler.h | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/Compiler.h b/src/Compiler.h index fa2bf5dde..14dd5d248 100644 --- a/src/Compiler.h +++ b/src/Compiler.h @@ -22,16 +22,15 @@ #define GCC_MAKE_VERSION(major, minor, patchlevel) ((major) * 10000 + (minor) * 100 + patchlevel) -#define GCC_CHECK_VERSION(major, minor) \ - (defined(__GNUC__) && \ - (__GNUC__ > (major) || (__GNUC__ == (major) && __GNUC_MINOR__ >= (minor)))) - #ifdef __GNUC__ #define GCC_VERSION GCC_MAKE_VERSION(__GNUC__, __GNUC_MINOR__, __GNUC_PATCHLEVEL__) #else #define GCC_VERSION 0 #endif +#define GCC_CHECK_VERSION(major, minor) \ + (defined(__GNUC__) && GCC_VERSION >= GCC_MAKE_VERSION(major, minor, 0)) + #ifdef __clang__ # define CLANG_VERSION GCC_MAKE_VERSION(__clang_major__, __clang_minor__, __clang_patchlevel__) # if __clang_major__ < 3 |