Skip to content

Commit b350794

Browse files
committed
Fix definition check for GNUC
1 parent 645250b commit b350794

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

include/json/config.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ msvc_pre1900_c99_snprintf(char* outBuf, size_t size, const char* format, ...);
108108
#if __has_extension(attribute_deprecated_with_message)
109109
#define JSONCPP_DEPRECATED(message) __attribute__((deprecated(message)))
110110
#endif
111-
#elif defined __GNUC__ // not clang (gcc comes later since clang emulates gcc)
111+
#elif defined(__GNUC__) // not clang (gcc comes later since clang emulates gcc)
112112
#if (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 5))
113113
#define JSONCPP_DEPRECATED(message) __attribute__((deprecated(message)))
114114
#elif (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1))
@@ -123,7 +123,7 @@ msvc_pre1900_c99_snprintf(char* outBuf, size_t size, const char* format, ...);
123123
#define JSONCPP_DEPRECATED(message)
124124
#endif // if !defined(JSONCPP_DEPRECATED)
125125

126-
#if __GNUC__ >= 6
126+
#if defined(__GNUC__) && (__GNUC__ >= 6)
127127
#define JSON_USE_INT64_DOUBLE_CONVERSION 1
128128
#endif
129129

0 commit comments

Comments
 (0)