aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-03-07 17:46:54 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-03-07 17:46:54 +0000
commit59a160c638f7153f8c8f4ac50d4d2e5a6fdf71a2 (patch)
treefa1c6f161dde6a6c945ff7015aad641385b27884 /include
parentf75cebe2c7d7a0d9a5126eac523cf576f388085e (diff)
downloadruby-59a160c638f7153f8c8f4ac50d4d2e5a6fdf71a2.tar.gz
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
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 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