diff options
author | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-03-07 17:46:54 +0000 |
---|---|---|
committer | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-03-07 17:46:54 +0000 |
commit | 6c127aeae15f65826b23fed0a8d3647ef8a2d9f5 (patch) | |
tree | fa1c6f161dde6a6c945ff7015aad641385b27884 | |
parent | d0708e9e2a13b8dd98cbf7e0f1b67cee5f9cdfa4 (diff) |
Avoid to cast the argument
For 32bit environment and __int128 use cases.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57803 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-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 1cc9937acb..27c62397ac 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 a=(f),c; !__builtin_add_overflow(a, a, &c);}) +# define RB_FIXABLE(f) ({SIGNED_VALUE c; !__builtin_add_overflow((f), (f), &c);}) #else # define RB_FIXABLE(f) (RB_POSFIXABLE(f) && RB_NEGFIXABLE(f)) #endif |