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.
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
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.
- 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]
Also available in: Atom
PDF
Like0
Like0Like0