diff options
author | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-03-07 17:51:35 +0000 |
---|---|---|
committer | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-03-07 17:51:35 +0000 |
commit | 110760fa5deb947680469dbbe1ae8ce3acdd0844 (patch) | |
tree | 896f5202de73cc19f1c476de6038c32f8b78f2a0 /include | |
parent | 07032325a7118f2c8452ee62cf20daea628bdba7 (diff) | |
download | ruby-110760fa5deb947680469dbbe1ae8ce3acdd0844.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.h | 2 |
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 |