Re: [Boost-bugs] [Boost C++ Libraries] #585: 64 bit compile warning/error for boost::format

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #585: 64 bit compile warning/error for boost::format
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2007-08-19 15:57:07


#585: 64 bit compile warning/error for boost::format
---------------------+------------------------------------------------------
  Reporter: nobody | Owner: samuel_k
      Type: Bugs | Status: assigned
 Milestone: | Component: format
   Version: None | Severity: Problem
Resolution: None | Keywords:
---------------------+------------------------------------------------------
Changes (by marshall):

  * component: None => format
  * severity: => Problem

Old description:

> {{{
> 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_at_[hidden]
>
> ++++++++++++++++++++++++++++++++++++++++++++
> 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 ==========
>
> }}}

New description:

 {{{
 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_at_[hidden]

 ++++++++++++++++++++++++++++++++++++++++++++
 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 ==========

 }}}

--
Ticket URL: <http://svn.boost.org/trac/boost/ticket/585#comment:2>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.


This archive was generated by hypermail 2.1.7 : 2017-02-16 18:49:56 UTC