1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* internal.h (bit_length): Add casts to fix complation error with

clang 3.0 -Werror,-Wshorten-64-to-32.
  [ruby-dev:47687] reported by SASADA Koichi.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42784 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
akr 2013-09-02 22:29:48 +00:00
parent 69d0f84bfa
commit 3065dd71e8
2 changed files with 15 additions and 9 deletions

View file

@ -1,3 +1,9 @@
Tue Sep 3 07:28:49 2013 Tanaka Akira <akr@fsij.org>
* internal.h (bit_length): Add casts to fix complation error with
clang 3.0 -Werror,-Wshorten-64-to-32.
[ruby-dev:47687] reported by SASADA Koichi.
Tue Sep 3 03:17:26 2013 Koichi Sasada <ko1@atdot.net> Tue Sep 3 03:17:26 2013 Koichi Sasada <ko1@atdot.net>
* vm_insnhelper.c (vm_search_super_method): use ci->argc instead of * vm_insnhelper.c (vm_search_super_method): use ci->argc instead of

View file

@ -217,19 +217,19 @@ nlz_int128(uint128_t x)
#if defined(HAVE_UINT128_T) #if defined(HAVE_UINT128_T)
# define bit_length(x) \ # define bit_length(x) \
(sizeof(x) <= SIZEOF_INT ? SIZEOF_INT * CHAR_BIT - nlz_int(x) : \ (sizeof(x) <= SIZEOF_INT ? SIZEOF_INT * CHAR_BIT - nlz_int((unsigned int)x) : \
sizeof(x) <= SIZEOF_LONG ? SIZEOF_LONG * CHAR_BIT - nlz_long(x) : \ sizeof(x) <= SIZEOF_LONG ? SIZEOF_LONG * CHAR_BIT - nlz_long((unsigned long)x) : \
sizeof(x) <= SIZEOF_LONG_LONG ? SIZEOF_LONG_LONG * CHAR_BIT - nlz_long_long(x) : \ sizeof(x) <= SIZEOF_LONG_LONG ? SIZEOF_LONG_LONG * CHAR_BIT - nlz_long_long((unsigned LONG_LONG)x) : \
SIZEOF_INT128_T * CHAR_BIT - nlz_int128(x)) SIZEOF_INT128_T * CHAR_BIT - nlz_int128((uint128_t)x))
#elif defined(HAVE_LONG_LONG) #elif defined(HAVE_LONG_LONG)
# define bit_length(x) \ # define bit_length(x) \
(sizeof(x) <= SIZEOF_INT ? SIZEOF_INT * CHAR_BIT - nlz_int(x) : \ (sizeof(x) <= SIZEOF_INT ? SIZEOF_INT * CHAR_BIT - nlz_int((unsigned int)x) : \
sizeof(x) <= SIZEOF_LONG ? SIZEOF_LONG * CHAR_BIT - nlz_long(x) : \ sizeof(x) <= SIZEOF_LONG ? SIZEOF_LONG * CHAR_BIT - nlz_long((unsigned long)x) : \
SIZEOF_LONG_LONG * CHAR_BIT - nlz_long_long(x)) SIZEOF_LONG_LONG * CHAR_BIT - nlz_long_long((unsigned LONG_LONG)x))
#else #else
# define bit_length(x) \ # define bit_length(x) \
(sizeof(x) <= SIZEOF_INT ? SIZEOF_INT * CHAR_BIT - nlz_int(x) : \ (sizeof(x) <= SIZEOF_INT ? SIZEOF_INT * CHAR_BIT - nlz_int((unsigned int)x) : \
SIZEOF_LONG * CHAR_BIT - nlz_long(x)) SIZEOF_LONG * CHAR_BIT - nlz_long((unsigned long)x))
#endif #endif
struct rb_deprecated_classext_struct { struct rb_deprecated_classext_struct {