summaryrefslogtreecommitdiff
path: root/bignum.c
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2019-09-10 17:20:12 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2019-09-10 17:20:31 +0900
commitad6cbc1d33d6013ef9b1d2ff9deb286956d9bcbc (patch)
tree21b1c77c99fae6a69e33689499564d675870b5f7 /bignum.c
parent487d290044c5876991d0b9c577bf77a667ec6b93 (diff)
Unused LONG_MAX_as_double
LONG_MAX_as_double is not needed when long is small enough to be exactly representable as a double, e.g., IL32LLP64 platforms.
Diffstat (limited to 'bignum.c')
-rw-r--r--bignum.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/bignum.c b/bignum.c
index 5d14306d77..f379b10489 100644
--- a/bignum.c
+++ b/bignum.c
@@ -5369,6 +5369,7 @@ rb_integer_float_cmp(VALUE x, VALUE y)
return INT2FIX(-1);
}
+#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")
@@ -5377,6 +5378,7 @@ COMPILER_WARNING_IGNORED(-Wimplicit-int-float-conversion)
#endif
static const double LONG_MAX_as_double = LONG_MAX;
COMPILER_WARNING_POP
+#endif
VALUE
rb_integer_float_eq(VALUE x, VALUE y)