diff options
author | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-06-25 10:36:14 +0000 |
---|---|---|
committer | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-06-25 10:36:14 +0000 |
commit | e4e5bc118e8abe96ff352dac2c7c62f9094a6e70 (patch) | |
tree | 08fce2e4e251596266245b2408bd194f96c339c6 | |
parent | b51a43e1c2608531bd8f25c606f9529aeba1c8a4 (diff) | |
download | ruby-e4e5bc118e8abe96ff352dac2c7c62f9094a6e70.tar.gz |
* bignum.c (LSHIFTX): Revert r41611.
The redundant expression suppresses a warning, C4293, by Visual
Studio.
http://ruby-mswin.cloudapp.net/vc10-x64/ruby-trunk/log/20130625T072854Z.log.html.gz#miniruby
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41620 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | bignum.c | 3 |
2 files changed, 9 insertions, 1 deletions
@@ -1,3 +1,10 @@ +Tue Jun 25 19:07:33 2013 Tanaka Akira <akr@fsij.org> + + * bignum.c (LSHIFTX): Revert r41611. + The redundant expression suppresses a warning, C4293, by Visual + Studio. + http://ruby-mswin.cloudapp.net/vc10-x64/ruby-trunk/log/20130625T072854Z.log.html.gz#miniruby + Tue Jun 25 19:03:00 2013 Tanaka Akira <akr@fsij.org> * bignum.c (big2ulong): Add a cast. @@ -39,7 +39,8 @@ static VALUE big_three = Qnil; # define HOST_BIGENDIAN_P 0 #endif #define ALIGNOF(type) ((int)offsetof(struct { char f1; type f2; }, f2)) -#define LSHIFTX(d, n) (sizeof(d) * CHAR_BIT <= (n) ? 0 : ((d) << (n))) +/* (sizeof(d) * CHAR_BIT <= (n) ? 0 : (n)) is same as n but suppress a warning, C4293, by Visual Studio. */ +#define LSHIFTX(d, n) (sizeof(d) * CHAR_BIT <= (n) ? 0 : ((d) << (sizeof(d) * CHAR_BIT <= (n) ? 0 : (n)))) #define CLEAR_LOWBITS(d, numbits) ((d) & LSHIFTX(~((d)*0), (numbits))) #define FILL_LOWBITS(d, numbits) ((d) | (LSHIFTX(((d)*0+1), (numbits))-1)) |