From 131e5843912993ea17024fdca274e74c78d9148a Mon Sep 17 00:00:00 2001 From: John Steele Scott Date: Thu, 25 Feb 2021 22:39:02 +1030 Subject: [PATCH] FMT_GCC_VERSION is not defined when we include test-assert.h, use __GCC__ instead. --- test/test-assert.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/test-assert.h b/test/test-assert.h index fe949720..d91a9ccd 100644 --- a/test/test-assert.h +++ b/test/test-assert.h @@ -24,7 +24,7 @@ void assertion_failure::avoid_weak_vtable() {} inline void throw_assertion_failure (const char *message) { -# if FMT_GCC_VERSION >= 600 +# if defined(__GNUC__) && __GNUC__ >= 6 // Avoid warnings when FMT_ASSERT is used in a destructor. # pragma GCC diagnostic push # pragma GCC diagnostic ignored "-Wterminate" @@ -32,7 +32,7 @@ inline void throw_assertion_failure (const char *message) throw assertion_failure(message); -# if FMT_GCC_VERSION >= 600 +# if defined(__GNUC__) && __GNUC__ >= 6 # pragma GCC diagnostic pop # endif }