From 8721e4c3a68bfc94cd38be6a02befd490a4b7940 Mon Sep 17 00:00:00 2001 From: Remotion Date: Sat, 9 Jun 2018 16:20:09 +0200 Subject: [PATCH 1/2] Fixed GCC version test. --- include/fmt/format.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/fmt/format.h b/include/fmt/format.h index 71a331e3..a5ea67fd 100644 --- a/include/fmt/format.h +++ b/include/fmt/format.h @@ -51,7 +51,7 @@ # define FMT_ICC_VERSION 0 #endif -#if (defined(__GNUC__) && !defined(__clang__) && __GNUC__ >= 406) || \ +#if (defined(__GNUC__) && !defined(__clang__) && (__GNUC__ * 100 + __GNUC_MINOR__) >= 406) || \ FMT_CLANG_VERSION # pragma GCC diagnostic push From 1104e1b2da64bd8dba3cb27e4b5a2be953bd98d7 Mon Sep 17 00:00:00 2001 From: Remotion Date: Sun, 10 Jun 2018 13:58:35 +0200 Subject: [PATCH 2/2] Moved core.h before GCC version test. Using FMT_GCC_VERSION from core.h to test GCC version. --- include/fmt/format.h | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/include/fmt/format.h b/include/fmt/format.h index a5ea67fd..2f2eb04f 100644 --- a/include/fmt/format.h +++ b/include/fmt/format.h @@ -51,8 +51,9 @@ # define FMT_ICC_VERSION 0 #endif -#if (defined(__GNUC__) && !defined(__clang__) && (__GNUC__ * 100 + __GNUC_MINOR__) >= 406) || \ - FMT_CLANG_VERSION +#include "core.h" + +#if (FMT_GCC_VERSION >= 406) || FMT_CLANG_VERSION # pragma GCC diagnostic push // Disable the warning about declaration shadowing because it affects too @@ -64,8 +65,6 @@ # pragma GCC diagnostic ignored "-Wsign-conversion" #endif -#include "core.h" - #ifdef _SECURE_SCL # define FMT_SECURE_SCL _SECURE_SCL #else