Project

General

Profile

Actions

Bug #8522

closed

r41264 causes "implicit conversion loses integer precision" on clang

Added by drbrain (Eric Hodel) over 11 years ago. Updated over 11 years ago.

Status:
Closed
Target version:
[ruby-core:55467]

Description

=begin
compiling ../trunk/bignum.c
../trunk/bignum.c:1128:46: error: implicit conversion loses integer precision:
'unsigned long' to 'int' [-Werror,-Wshorten-64-to-32]
*nlp_bits_ret = num_bdigits * BITSPERDIG - num_bits;
~ ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~
1 error generated.
make: *** [bignum.o] Error 1

=end


Files

bignum.c.bug8522.patch (1.92 KB) bignum.c.bug8522.patch drbrain (Eric Hodel), 06/13/2013 05:29 AM

Updated by drbrain (Eric Hodel) over 11 years ago

This patch changes int nlp_bits to size_t nlp_bits, but I don't know enough about bignum.c to know if this is appropriate.

Actions #2

Updated by akr (Akira Tanaka) over 11 years ago

  • Status changed from Assigned to Closed
  • % Done changed from 0 to 100

This issue was solved with changeset r41267.
Eric, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.


  • bignum.c (integer_unpack_num_bdigits_small): Fix a comple error on
    clang -Werror,-Wshorten-64-to-32
    Reported by Eric Hodel. [ruby-core:55467] [Bug #8522]
Actions

Also available in: Atom PDF

Like0
Like0Like0