Opened 17 years ago

Closed 15 years ago

#585 closed Bugs (fixed)

64 bit compile warning/error for boost::format

Reported by: nobody Owned by: samuel_k
Milestone: Boost 1.35.0 Component: format
Version: None Severity: Problem
Keywords: Cc:

Description (last modified by Marshall Clow)

We are using MS Visual Studio 2005.  Compiling for 64
bit Windos.  We are compiling with warning level 4 and
warnings == error.

We're using boost 1.33.1 and STLPort 5.0.0

boost::format generates a possible loss of data
conversion warning when compiling alt_sstream_impl.hpp

-Lee

lee.eggebroten@atlassolutions.com

++++++++++++++++++++++++++++++++++++++++++++
1>c:\External\boost_1_33_1\boost/format/alt_sstream_impl.hpp(110)
: error C2220: warning treated as error - no 'object'
file generated
1>       
c:\External\boost_1_33_1\boost/format/alt_sstream_impl.hpp(96)
: while compiling class template member function
'stlp_std::fpos<_StateT>
boost::io::basic_altstringbuf<Ch,Tr,Alloc>::seekoff(__int64,stlp_std::ios_base::seekdir,stlp_std::ios_base::openmode)'
1>        with
1>        [
1>            _StateT=mbstate_t,
1>            Ch=char,
1>            Tr=stlp_std::char_traits<char>,
1>            Alloc=stlp_std::allocator<char>
1>        ]
1>       
c:\External\boost_1_33_1\boost/format/format_class.hpp(136)
: see reference to class template instantiation
'boost::io::basic_altstringbuf<Ch,Tr,Alloc>' being compiled
1>        with
1>        [
1>            Ch=char,
1>            Tr=stlp_std::char_traits<char>,
1>            Alloc=stlp_std::allocator<char>
1>        ]
1>        ..\PVMTrace.cpp(120) : see reference to class
template instantiation 'boost::basic_format<Ch>' being
compiled
1>        with
1>        [
1>            Ch=char
1>        ]
1>c:\External\boost_1_33_1\boost/format/alt_sstream_impl.hpp(110)
: warning C4244: 'argument' : conversion from '__int64'
to 'int', possible loss of data
1>c:\External\boost_1_33_1\boost/format/alt_sstream_impl.hpp(128)
: warning C4244: 'argument' : conversion from '__int64'
to 'int', possible loss of data
1>c:\External\boost_1_33_1\boost/format/feed_args.hpp(53)
: warning C4244: 'argument' : conversion from
'stlp_std::streamsize' to
'stlp_std::basic_string<_CharT,_Traits,_Alloc>::size_type',
possible loss of data
1>        with
1>        [
1>            _CharT=char,
1>            _Traits=stlp_std::char_traits<char>,
1>            _Alloc=stlp_std::allocator<char>
1>        ]
1>       
c:\External\boost_1_33_1\boost/format/feed_args.hpp(161)
: see reference to function template instantiation
'void
boost::io::detail::mk_str<char,stlp_std::char_traits<char>,stlp_std::allocator<_Tp>>(stlp_std::basic_string<_CharT,_Traits,_Alloc>
&,const Ch
*,stlp_std::basic_string<_CharT,_Traits,_Alloc>::size_type,stlp_std::streamsize,const
Ch,stlp_std::ios_base::fmtflags,const Ch,bool)' being
compiled
1>        with
1>        [
1>            _Tp=char,
1>            _CharT=char,
1>            _Traits=stlp_std::char_traits<char>,
1>            _Alloc=stlp_std::allocator<char>,
1>            Ch=char
1>        ]
1>       
c:\External\boost_1_33_1\boost/format/feed_args.hpp(242)
: see reference to function template instantiation
'void boost::io::detail::put<Ch,Tr,Alloc,T>(T,const
boost::io::detail::format_item<Ch,Tr,Alloc>
&,stlp_std::basic_string<_CharT,_Traits,_Alloc>
&,boost::io::basic_altstringbuf<Ch,Tr,Alloc>
&,boost::io::detail::locale_t *)' being compiled
1>        with
1>        [
1>            Ch=char,
1>            Tr=stlp_std::char_traits<char>,
1>            Alloc=stlp_std::allocator<char>,
1>            T=const stlp_std::string &,
1>            _CharT=char,
1>            _Traits=stlp_std::char_traits<char>,
1>            _Alloc=stlp_std::allocator<char>
1>        ]
1>       
c:\External\boost_1_33_1\boost/format/feed_args.hpp(251)
: see reference to function template instantiation
'void
boost::io::detail::distribute<Ch,Tr,Alloc,T>(boost::basic_format<Ch>
&,T)' being compiled
1>        with
1>        [
1>            Ch=char,
1>            Tr=stlp_std::char_traits<char>,
1>            Alloc=stlp_std::allocator<char>,
1>            T=const stlp_std::string &
1>        ]
1>       
c:\External\boost_1_33_1\boost/format/format_class.hpp(64)
: see reference to function template instantiation
'boost::basic_format<Ch>
&boost::io::detail::feed<char,Tr,Alloc,const
T&>(boost::basic_format<Ch> &,const
stlp_std::basic_string<_CharT,_Traits,_Alloc>)' being
compiled
1>        with
1>        [
1>            Ch=char,
1>            Tr=stlp_std::char_traits<char>,
1>            Alloc=stlp_std::allocator<char>,
1>            T=stlp_std::string,
1>            _CharT=char,
1>            _Traits=stlp_std::char_traits<char>,
1>            _Alloc=stlp_std::allocator<char>
1>        ]
1>        ..\PVMTrace.cpp(121) : see reference to
function template instantiation
'boost::basic_format<Ch>
&boost::basic_format<Ch>::operator
%<stlp_std::string>(const T &)' being compiled
1>        with
1>        [
1>            Ch=char,
1>            T=stlp_std::string
1>        ]
1>c:\External\boost_1_33_1\boost/format/feed_args.hpp(62)
: warning C4244: 'argument' : conversion from
'stlp_std::streamsize' to
'stlp_std::basic_string<_CharT,_Traits,_Alloc>::size_type',
possible loss of data
1>        with
1>        [
1>            _CharT=char,
1>            _Traits=stlp_std::char_traits<char>,
1>            _Alloc=stlp_std::allocator<char>
1>        ]
1>c:\External\boost_1_33_1\boost/format/feed_args.hpp(66)
: warning C4244: 'argument' : conversion from
'stlp_std::streamsize' to
'stlp_std::basic_string<_CharT,_Traits,_Alloc>::size_type',
possible loss of data
1>        with
1>        [
1>            _CharT=char,
1>            _Traits=stlp_std::char_traits<char>,
1>            _Alloc=stlp_std::allocator<char>
1>        ]
1>Build Time 0:02
1>Build log was saved at "file://c:\Ad
Serving\main\pvm\pvm_core\Release_Win32\BuildLog.htm"
1>pvm_core - 1 error(s), 5 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date,
0 skipped ==========

Change History (3)

comment:1 by anonymous, 15 years ago

Reproducable with 1.34.0

comment:2 by Marshall Clow, 15 years ago

Component: Noneformat
Description: modified (diff)
Severity: Problem

comment:3 by John Maddock, 15 years ago

Milestone: Boost 1.35.0
Resolution: Nonefixed
Status: assignedclosed

Reproduced and fixed in SVN.

Note: See TracTickets for help on using tickets.