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

ruby-changes:43460

From: nobu <ko1@a...>
Date: Wed, 29 Jun 2016 13:37:18 +0900 (JST)
Subject: [ruby-changes:43460] nobu:r55534 (trunk): VC6 error

nobu	2016-06-29 13:37:13 +0900 (Wed, 29 Jun 2016)

  New Revision: 55534

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=55534

  Log:
    VC6 error
    
    * random.c (int_pair_to_real_inclusive): get rid of VC6 compile
      error C2520: conversion from unsigned __int64 to double not
      implemented.

  Modified files:
    trunk/random.c
Index: random.c
===================================================================
--- random.c	(revision 55533)
+++ random.c	(revision 55534)
@@ -286,7 +286,7 @@ int_pair_to_real_inclusive(uint32_t a, u https://github.com/ruby/ruby/blob/trunk/random.c#L286
     const uint128_t m = ((uint128_t)1 << dig) | 1;
     uint128_t x = ((uint128_t)a << 32) | b;
     r = (double)(uint64_t)((x * m) >> 64);
-#elif defined HAVE_UINT64_T
+#elif defined HAVE_UINT64_T && !(defined _MSC_VER && _MSC_VER <= 1200)
     uint64_t x = ((uint64_t)a << dig_u) +
 	(((uint64_t)b + (a >> dig_u)) >> dig_r64);
     r = (double)x;

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

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