[前][次][番号順一覧][スレッド一覧]

ruby-changes:29710

From: nobu <ko1@a...>
Date: Thu, 4 Jul 2013 00:36:38 +0900 (JST)
Subject: [ruby-changes:29710] nobu:r41762 (trunk): internal.h: supperss warning

nobu	2013-07-04 00:36:10 +0900 (Thu, 04 Jul 2013)

  New Revision: 41762

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=41762

  Log:
    internal.h: supperss warning
    
    * internal.h (SIGNED_INTEGER_MAX): supperss warning C4146 on VC6.
      seems a logical ORed expression becomes unsigned.

  Modified files:
    trunk/ChangeLog
    trunk/internal.h

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 41761)
+++ ChangeLog	(revision 41762)
@@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Thu Jul  4 00:36:03 2013  Nobuyoshi Nakada  <nobu@r...>
+
+	* 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@r...>
 
 	* ruby_atomic.h (rb_w32_atomic_cas): call InterlockedCompareExchange
Index: internal.h
===================================================================
--- internal.h	(revision 41761)
+++ internal.h	(revision 41762)
@@ -29,6 +29,7 @@ extern "C" { https://github.com/ruby/ruby/blob/trunk/internal.h#L29
 
 #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)

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]