aboutsummaryrefslogtreecommitdiffstats
path: root/bignum.c
diff options
context:
space:
mode:
author卜部昌平 <shyouhei@ruby-lang.org>2019-12-02 14:58:43 +0900
committer卜部昌平 <shyouhei@ruby-lang.org>2019-12-26 20:45:12 +0900
commit0958e19ffb047781fe1506760c7cbd8d7fe74e57 (patch)
treeca20d9181667d746c6df55c63f595980e9a77fbc /bignum.c
parent863dbb21d8912c73e84fed47f2d3a1ac5d8275d4 (diff)
downloadruby-0958e19ffb047781fe1506760c7cbd8d7fe74e57.tar.gz
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().
Diffstat (limited to 'bignum.c')
-rw-r--r--bignum.c2
1 files changed, 0 insertions, 2 deletions
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