From b3507948e2a1a79dfb1a8ac7b1e2dc1bea9f8360 Mon Sep 17 00:00:00 2001 From: Jordan Bayles Date: Fri, 12 Jul 2019 11:07:12 -0700 Subject: [PATCH] Fix definition check for GNUC --- include/json/config.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/json/config.h b/include/json/config.h index 8724ad9..2f70522 100644 --- a/include/json/config.h +++ b/include/json/config.h @@ -108,7 +108,7 @@ msvc_pre1900_c99_snprintf(char* outBuf, size_t size, const char* format, ...); #if __has_extension(attribute_deprecated_with_message) #define JSONCPP_DEPRECATED(message) __attribute__((deprecated(message))) #endif -#elif defined __GNUC__ // not clang (gcc comes later since clang emulates gcc) +#elif defined(__GNUC__) // not clang (gcc comes later since clang emulates gcc) #if (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 5)) #define JSONCPP_DEPRECATED(message) __attribute__((deprecated(message))) #elif (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1)) @@ -123,7 +123,7 @@ msvc_pre1900_c99_snprintf(char* outBuf, size_t size, const char* format, ...); #define JSONCPP_DEPRECATED(message) #endif // if !defined(JSONCPP_DEPRECATED) -#if __GNUC__ >= 6 +#if defined(__GNUC__) && (__GNUC__ >= 6) #define JSON_USE_INT64_DOUBLE_CONVERSION 1 #endif