Boost logo

Boost :

From: George M. Garner Jr. (gmgarner_at_[hidden])
Date: 2005-12-08 13:29:55


David,

Not all of the warnings are benign. For example I get the following when
compiling regex under vc8 with /analyze:

h:\source code\boost\boost_1_33_1\libs\regex\src\wide_posix_api.cpp(159) :
warning C6200: Index '20' is out of valid index range '0' to '15' for
non-stack buffer 'wchar_t const * * boost::`anonymous namespace'::wnames'
h:\source
code\boost\boost_1_33_1\boost\regex\v4\basic_regex_creator.hpp(1183) :
warning C6297: Arithmetic overflow: 32-bit value is shifted, then cast to
64-bit value. Results might not be an expected value
h:\source
code\boost\boost_1_33_1\boost\regex\v4\basic_regex_creator.hpp(1203) :
warning C6297: Arithmetic overflow: 32-bit value is shifted, then cast to
64-bit value. Results might not be an expected value
h:\source code\boost\boost_1_33_1\libs\regex\src\posix_api.cpp(146) :
warning C6200: Index '20' is out of valid index range '0' to '15' for
non-stack buffer 'char const * * boost::`anonymous namespace'::names'
h:\source code\boost\boost_1_33_1\libs\regex\src\posix_api.cpp(132) :
warning C6385: Invalid data: accessing 'char const * * boost::`anonymous
namespace'::names', the readable size is '64' bytes, but '84' bytes might be
read: Lines: 126, 127, 129, 130, 132
h:\source code\boost\boost_1_33_1\boost\regex\v4\w32_regex_traits.hpp(537) :
warning C6385: Invalid data: accessing 'unsigned long const * const
`private: unsigned long __thiscall
boost::re_detail::w32_regex_traits_implementation<char>::lookup_classname_imp(char
const *,char const *)const '::`2'::masks', the readable size is '80' bytes,
but '84' bytes might be read: Lines: 505, 528, 530, 531, 532, 535, 536, 537
h:\source
code\boost\boost_1_33_1\boost\regex\v4\basic_regex_creator.hpp(1203) :
warning C6297: Arithmetic overflow: 32-bit value is shifted, then cast to
64-bit value. Results might not be an expected value
h:\source
code\boost\boost_1_33_1\boost\regex\v4\basic_regex_creator.hpp(576) :
warning C6246: Local declaration of 'c3' hides declaration of the same name
in outer scope. For additional information, see previous declaration at line
'565' of 'h:\source
code\boost\boost_1_33_1\boost\regex\v4\basic_regex_creator.hpp': Lines: 565
Generally I have found these warnings to be right on with my own code. :-)
While some of the warnings represent MS design decisions (e.g. deprecating
certain SL functions), code analysis as a whole is very helpful and boost
might benefit from it.

Regards,

George.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk