Code

Compiler.h: add macro GCC_MAKE_VERSION()
authorMax Kellermann <max.kellermann@gmail.com>
Fri, 10 Mar 2017 20:32:54 +0000 (21:32 +0100)
committerMax Kellermann <max.kellermann@gmail.com>
Fri, 10 Mar 2017 20:32:54 +0000 (21:32 +0100)
src/Compiler.h

index 9756e1fe27e786a498e87fa2c6cb15f597a115c0..43bc9a85521bb5ad01e592fd3c16c5d4230bb7af 100644 (file)
   (defined(__GNUC__) &&                                                 \
    (__GNUC__ > (major) || (__GNUC__ == (major) && __GNUC_MINOR__ >= (minor))))
 
+#define GCC_MAKE_VERSION(major, minor, patchlevel) ((major) * 10000 + (minor) * 100 + patchlevel)
+
 #ifdef __GNUC__
-#define GCC_VERSION (__GNUC__ * 10000 \
-                     + __GNUC_MINOR__ * 100 \
-                     + __GNUC_PATCHLEVEL__)
+#  define GCC_VERSION GCC_MAKE_VERSION(__GNUC__, __GNUC_MINOR__, __GNUC_PATCHLEVEL__)
 #else
-#define GCC_VERSION 0
+#  define GCC_VERSION 0
 #endif
 
 #if GCC_CHECK_VERSION(4,0)