aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-03-07 17:51:35 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-03-07 17:51:35 +0000
commitebccfa553172004aa1ef058142f36140e5760e15 (patch)
tree896f5202de73cc19f1c476de6038c32f8b78f2a0 /include
parent5dd8f1e2d61bb358ce4979c794acad189f6d96de (diff)
downloadruby-ebccfa553172004aa1ef058142f36140e5760e15.tar.gz
Revert r57803 "Avoid to cast the argument"
__builtin_add_overflow doesn't support double. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57805 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'include')
-rw-r--r--include/ruby/ruby.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/ruby/ruby.h b/include/ruby/ruby.h
index 27c62397ac..1cc9937acb 100644
--- a/include/ruby/ruby.h
+++ b/include/ruby/ruby.h
@@ -360,7 +360,7 @@ rb_fix2ulong(VALUE x)
#define RB_POSFIXABLE(f) ((f) < RUBY_FIXNUM_MAX+1)
#define RB_NEGFIXABLE(f) ((f) >= RUBY_FIXNUM_MIN)
#if defined HAVE_BUILTIN___BUILTIN_ADD_OVERFLOW
-# define RB_FIXABLE(f) ({SIGNED_VALUE c; !__builtin_add_overflow((f), (f), &c);})
+# define RB_FIXABLE(f) ({SIGNED_VALUE a=(f),c; !__builtin_add_overflow(a, a, &c);})
#else
# define RB_FIXABLE(f) (RB_POSFIXABLE(f) && RB_NEGFIXABLE(f))
#endif