jsoncpp: Define JSON_USE_INT64_DOUBLE_CONVERSION for clang as well. (#1002)

The current check to define JSON_USE_INT64_DOUBLE_CONVERSION
works for GCC but not clang.

Clang does define __GNUC__ but with a value 4 which misses
the check for >= 6.

This avoids the -Wimplicit-int-float-conversion warning
when jsoncpp is built with a recent version of clang.

Signed-off-by: Manoj Gupta <manojgupta@google.com>
This commit is contained in:
m-gupta 2019-09-16 12:24:13 -07:00 committed by Jordan Bayles
parent 2cb9a5803e
commit 3013ed48b3

View File

@ -104,7 +104,9 @@ msvc_pre1900_c99_snprintf(char* outBuf, size_t size, const char* format, ...);
#define JSONCPP_OP_EXPLICIT #define JSONCPP_OP_EXPLICIT
#endif #endif
#if defined(__GNUC__) && (__GNUC__ >= 6) #if defined(__clang__)
#define JSON_USE_INT64_DOUBLE_CONVERSION 1
#elif defined(__GNUC__) && (__GNUC__ >= 6)
#define JSON_USE_INT64_DOUBLE_CONVERSION 1 #define JSON_USE_INT64_DOUBLE_CONVERSION 1
#endif #endif