summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-07-03 15:36:10 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-07-03 15:36:10 +0000
commitd1e0cc2750c79b295b6a8285064ad45db9085ac8 (patch)
tree58fcb486a02061076207b61888d4fe1d13df6677
parentc352ba8bb0ea2d1878b92213ef4ea54022e51813 (diff)
internal.h: supperss warning
* internal.h (SIGNED_INTEGER_MAX): supperss warning C4146 on VC6. seems a logical ORed expression becomes unsigned. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41762 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog5
-rw-r--r--internal.h1
2 files changed, 6 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index acdf0b0474..1cb4a1c5a6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Thu Jul 4 00:36:03 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * internal.h (SIGNED_INTEGER_MAX): supperss warning C4146 on VC6.
+ seems a logical ORed expression becomes unsigned.
+
Thu Jul 4 00:13:01 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
* ruby_atomic.h (rb_w32_atomic_cas): call InterlockedCompareExchange
diff --git a/internal.h b/internal.h
index edccd4cc99..6390277dd3 100644
--- a/internal.h
+++ b/internal.h
@@ -29,6 +29,7 @@ extern "C" {
#define SIGNED_INTEGER_TYPE_P(int_type) (0 > ((int_type)0)-1)
#define SIGNED_INTEGER_MAX(sint_type) \
+ (sint_type) \
((((sint_type)1) << (sizeof(sint_type) * CHAR_BIT - 2)) | \
((((sint_type)1) << (sizeof(sint_type) * CHAR_BIT - 2)) - 1))
#define SIGNED_INTEGER_MIN(sint_type) (-SIGNED_INTEGER_MAX(sint_type)-1)