vc8 and boost serialization library

I built the boost serialization library (Library and LibraryW projects) with VC8 and the /analyze option enabled. The build included http://users.erols.com/gmgarner/boost/WarningState.h with the following lines in visualc.hpp: #if (_MSC_VER >= 1400) #include "warningstate.h" #endif //(_MSC_VER >= 1400) The following errors were generated for Library (http://users.erols.com/gmgarner/boost/BuildLog.txt) and LibraryW (http://users.erols.com/gmgarner/boost/BuildLogW.zip). Regards, George.

More specifically, would someone please clarify these: 1>h:\source code\boost\boost_1_33_1\libs\serialization\src\basic_iarchive.cpp(498) : warning C6246: Local declaration of 'w' hides declaration of the same name in outer scope. For additional information, see previous declaration at line '482' of 'h:\source code\boost\boost_1_33_1\libs\serialization\src\basic_iarchive.cpp': Lines: 482 h:\source code\boost\boost_1_33_1\boost\archive\iterators\remove_whitespace.hpp(66) : error C6328: 'char' passed as parameter '1' when 'unsigned char' is required in call to 'isspace' h:\source code\boost\boost_1_33_1\libs\detail\utf8_codecvt_facet.cpp(162) : error C6269: Possibly incorrect order of operations: dereference ignored h:\program files\microsoft visual studio 8\vc\include\bitset(233) : error C6385: Invalid data: accessing '_Array', the readable size is '32' bytes, but '36' bytes might be read: Lines: 230, 231, 232, 233 H:\Program Files\Microsoft Visual Studio 8\VC\include\bitset(229) : while compiling class template member function 'std::bitset<_Bits> &std::bitset<_Bits>::set(size_t,bool)' with [ _Bits=0x100 ] h:\source code\boost\boost_1_33_1\libs\serialization\vc8ide\..\..\..\boost/spirit/utility/impl/chset/basic_chset.hpp(78) : see reference to class template instantiation 'std::bitset<_Bits>' being compiled with [ _Bits=0x100 ] h:\source code\boost\boost_1_33_1\libs\serialization\vc8ide\..\..\..\boost/spirit/utility/impl/chset/basic_chset.hpp(79) : see reference to class template instantiation 'boost::spirit::basic_chset_8bit<CharT>' being compiled h:\program files\microsoft visual studio 8\vc\include\bitset(410) : error C6326: Potential comparison of a constant with another constant H:\Program Files\Microsoft Visual Studio 8\VC\include\bitset(409) : while compiling class template member function 'void std::bitset<_Bits>::_Trim(void)' with [ _Bits=0x100 ] h:\program files\microsoft visual studio 8\vc\include\bitset(233) : error C6385: Invalid data: accessing '_Array', the readable size is '32' bytes, but '36' bytes might be read: Lines: 230, 231, 232, 233 H:\Program Files\Microsoft Visual Studio 8\VC\include\bitset(229) : while compiling class template member function 'std::bitset<_Bits> &std::bitset<_Bits>::set(size_t,bool)' with [ _Bits=0x100 ] h:\source code\boost\boost_1_33_1\libs\serialization\vc8ide\..\..\..\boost/spirit/utility/impl/chset/basic_chset.hpp(78) : see reference to class template instantiation 'std::bitset<_Bits>' being compiled with [ _Bits=0x100 ] h:\source code\boost\boost_1_33_1\libs\serialization\vc8ide\..\..\..\boost/spirit/utility/impl/chset/basic_chset.hpp(79) : see reference to class template instantiation 'boost::spirit::basic_chset_8bit<CharT>' being compiled h:\program files\microsoft visual studio 8\vc\include\bitset(410) : error C6326: Potential comparison of a constant with another constant H:\Program Files\Microsoft Visual Studio 8\VC\include\bitset(409) : while compiling class template member function 'void std::bitset<_Bits>::_Trim(void)' with [ _Bits=0x100 ] h:\source code\boost\boost_1_33_1\boost\archive\iterators\binary_from_base64.hpp(53) : error C6385: Invalid data: accessing 'lookup_table', the readable size is '128' bytes, but '130' bytes might be read: Lines: 41, 51, 52, 53 h:\program files\microsoft visual studio 8\vc\include\bitset(361) : error C6385: Invalid data: accessing '_Array', the readable size is '32' bytes, but '36' bytes might be read: Lines: 359, 360, 361 H:\Program Files\Microsoft Visual Studio 8\VC\include\bitset(358) : while compiling class template member function 'bool std::bitset<_Bits>::test(size_t) const' with [ _Bits=0x100 ] 1>h:\source code\boost\boost_1_33_1\boost\archive\impl\xml_iarchive_impl.ipp(70) : warning C6246: Local declaration of 'result' hides declaration of the same name in outer scope. For additional information, see previous declaration at line '56' of 'h:\source code\boost\boost_1_33_1\boost\archive\impl\xml_iarchive_impl.ipp': Lines: 56 h:\program files\microsoft visual studio 8\vc\include\bitset(233) : error C6385: Invalid data: accessing '_Array', the readable size is '32' bytes, but '36' bytes might be read: Lines: 230, 231, 232, 233 H:\Program Files\Microsoft Visual Studio 8\VC\include\bitset(229) : while compiling class template member function 'std::bitset<_Bits> &std::bitset<_Bits>::set(size_t,bool)' with [ _Bits=0x100 ] h:\source code\boost\boost_1_33_1\libs\serialization\vc8ide\..\..\..\boost/spirit/utility/impl/chset/basic_chset.hpp(78) : see reference to class template instantiation 'std::bitset<_Bits>' being compiled with [ _Bits=0x100 ] h:\source code\boost\boost_1_33_1\libs\serialization\vc8ide\..\..\..\boost/spirit/utility/impl/chset/basic_chset.hpp(79) : see reference to class template instantiation 'boost::spirit::basic_chset_8bit<CharT>' being compiled h:\program files\microsoft visual studio 8\vc\include\bitset(410) : error C6326: Potential comparison of a constant with another constant H:\Program Files\Microsoft Visual Studio 8\VC\include\bitset(409) : while compiling class template member function 'void std::bitset<_Bits>::_Trim(void)' with [ _Bits=0x100 ] Regards, George.

George M. Garner Jr. wrote:
More specifically, would someone please clarify these:
The seem pretty self-explanatory to me. The compiler if flagging code that is deemed likely to be erroneous and/or error prone. Worth taking a look at. Actually its seems a very short list given the amount of code involved. I'll review these when I have time. The rest originate outside of the serialization library.
1>h:\source code\boost\boost_1_33_1\libs\serialization\src\basic_iarchive.cpp(498) : warning C6246: Local declaration of 'w' hides declaration of the same name in outer scope. For additional information, see previous declaration at line '482' of 'h:\source code\boost\boost_1_33_1\libs\serialization\src\basic_iarchive.cpp': Lines: 482
h:\source code\boost\boost_1_33_1\boost\archive\iterators\remove_whitespace.hpp(66) : error C6328: 'char' passed as parameter '1' when 'unsigned char' is required in call to 'isspace' h:\source code\boost\boost_1_33_1\libs\detail\utf8_codecvt_facet.cpp(162) : error C6269: Possibly incorrect order of operations: dereference ignored
<snip>
h:\source code\boost\boost_1_33_1\boost\archive\iterators\binary_from_base64.hpp(53) : error C6385: Invalid data: accessing 'lookup_table', the readable size is '128' bytes, but '130' bytes might be read: Lines: 41, 51, 52, 53
<snip>
1>h:\source code\boost\boost_1_33_1\boost\archive\impl\xml_iarchive_impl.ipp(70) : warning C6246: Local declaration of 'result' hides declaration of the same name in outer scope. For additional information, see previous declaration at line '56' of 'h:\source code\boost\boost_1_33_1\boost\archive\impl\xml_iarchive_impl.ipp': Lines: 56
participants (2)
-
George M. Garner Jr.
-
Robert Ramey