From 0958e19ffb047781fe1506760c7cbd8d7fe74e57 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8D=9C=E9=83=A8=E6=98=8C=E5=B9=B3?= Date: Mon, 2 Dec 2019 14:58:43 +0900 Subject: add several __has_something macro With these macros implemented we can write codes just like we can assume the compiler being clang. MSC_VERSION_SINCE is defined to implement those macros, but turned out to be handy for other places. The -fdeclspec compiler flag is necessary for clang to properly handle __has_declspec(). --- bignum.c | 2 -- 1 file changed, 2 deletions(-) (limited to 'bignum.c') diff --git a/bignum.c b/bignum.c index 4569183e45..370c63c787 100644 --- a/bignum.c +++ b/bignum.c @@ -5373,11 +5373,9 @@ rb_integer_float_cmp(VALUE x, VALUE y) #if SIZEOF_LONG * CHAR_BIT >= DBL_MANT_DIG /* assume FLT_RADIX == 2 */ COMPILER_WARNING_PUSH -#ifdef __has_warning #if __has_warning("-Wimplicit-int-float-conversion") COMPILER_WARNING_IGNORED(-Wimplicit-int-float-conversion) #endif -#endif static const double LONG_MAX_as_double = LONG_MAX; COMPILER_WARNING_POP #endif -- cgit v1.2.3