Opened 9 years ago

Closed 9 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:

Description

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@…> 9 years ago.
Patch suggestion

Download all attachments as: .zip

Change History (2)

by Jan Bouwer <JBouwer@…>, 9 years ago

Patch suggestion

comment:1 by John Maddock, 9 years ago

Resolution: fixed
Status: newclosed

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

Note: See TracTickets for help on using tickets.