Opened 4 years ago

Closed 4 years ago

#8748 closed Bugs (fixed)

Warning: implicit conversion loses integer precision

Reported by: Jan Bouwer <JBouwer@…> Owned by: John Maddock
Milestone: To Be Determined Component: multiprecision
Version: Boost Development Trunk Severity: Problem
Keywords: warning Cc:


Trivial - Full error message:

boost/multiprecision/cpp_int.hpp:1614:23: warning: implicit conversion loses integer precision: 'size_type' (aka 'unsigned long') to 'unsigned int' [-Wshorten-64-to-32]
         unsigned n = result.find_first_not_of('0');
                  ~   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~

produced by clang (Apple LLVM version 4.2 (clang-425.0.28) (based on LLVM 3.2svn)) from svn #84915.

Attachments (1)

boost_multiprecision_cpp_int_warning.patch (436 bytes) - added by Jan Bouwer <JBouwer@…> 4 years ago.
Patch suggestion

Download all attachments as: .zip

Change History (2)

Changed 4 years ago by Jan Bouwer <JBouwer@…>

Patch suggestion

comment:1 Changed 4 years ago by John Maddock

Resolution: fixed
Status: newclosed

(In [84922]) Change to use std::string::size_type rather than unsigned. Fixes #8748.

Modify Ticket

Change Properties
Set your email in Preferences
as closed The owner will remain John Maddock.
The resolution will be deleted.

Add Comment

E-mail address and name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.