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>
diff --git a/include/json/config.h b/include/json/config.h
index 6426c3b..0ff5968 100644
--- a/include/json/config.h
+++ b/include/json/config.h
@@ -104,7 +104,9 @@
#define JSONCPP_OP_EXPLICIT
#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
#endif