Re: [Boost-bugs] [Boost C++ Libraries] #4184: compiler warnings in VC9

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #4184: compiler warnings in VC9
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2010-05-17 07:40:06


#4184: compiler warnings in VC9
----------------------------------------------------------------------+-----
 Reporter: Michael Stellmann <stellmann@…> | Owner: nasonov
     Type: Bugs | Status: new
Milestone: Boost 1.43.0 | Component: lexical_cast
  Version: Boost 1.42.0 | Severity: Problem
 Keywords: |
----------------------------------------------------------------------+-----

Comment(by anonymous):

 I did a simple test with VC8 and VC10 from command line "cl.exe" like this

 lex_test.cpp:
 ------------
 #include <...>
 void main()
 {
         size_t num = 12345;
         std::string num_to_string = boost::lexical_cast<std::string>( num
 );
 }

 ------------

 and it didn't show up, so I digged deeper and found out that the warning
 appears to be caused by the 64 bit warning switch /(Wp64), i.e. when you
 compile with

 cl lex_test.cpp /I<boost_1_42_0-dir> /EHsc /W4 /Wp64

 This happens with both tested VC compilers from command line, as well as
 in Win32 projects created with the VC8 (2005) Wizard.
 When using the command line, VC10 indicates the option "Wp64" as
 deprecated, and without the switch, it compiles without warning (as does
 VC8). However, all Win32 projects seem to have the switch enabled in VC8.

 Not sure if there is a real 'size_t' conversion issue on 64-bit targets or
 if it can be ignored.

 As VC reports the warning (like all problems with templates) in an ugly
 multi-line warning, the compile report gets quite verbose on projects
 which make heavy use of lexical_cast with the Wp64 option enabled when
 switching from e.g. boost 1.36.0 to 1.42.0.

 As there is already a disabled-warning-block-for-MSVC in the lexical_cast
 source at this place, I escaped from the warning report hell in my private
 local boost copy by excluding this warning as well.

 If you decide the source to be left unchanged, can you confirm there is no
 64-bit issue?

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/4184#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:50:03 UTC