Boost logo

Boost :

From: Stephan T. Lavavej (stl_at_[hidden])
Date: 2006-03-25 21:58:30


Hi,

I downloaded RC_1_34_0 from CVS on 20060324 and found -Wshadow and
-Wcast-qual warnings (from GCC 3.4.2) in three files.

My patch is here: http://stl.nuwen.net/boost-RC_1_34_0-20060324.patch

This patch supersedes my patch for 1.33.1; I verified that Jeff Garland's
and John Maddock's date-time and regex fixes, respectively, work in
RC_1_34_0 (thanks again!), and found that the C cast in
boost/range/detail/implementation_help.hpp was fixed 7 months ago.

[date-time]
* boost/date_time/gregorian/gregorian_io.hpp

This file contains several instances of a smaller-scope output_itr shadowing
a larger-scope output_itr. My local patch renames each larger-scope
output_itr to big_output_itr. (The larger-scope variable is the safer one to
rename in cases of local-local shadowing.)

[format]
* boost/format/format_implementation.hpp

This file has contained shadowing since at least 1.33.0.

[tokenizer]
* boost/token_iterator.hpp

This file has lacked a "const" since at least 1.33.0, which causes a *nasty*
-Wcast-qual warning: http://stl.nuwen.net/boost-warning.txt

This warning is nasty because its cause isn't immediately obvious.

Can the appropriate maintainers please take a look at these patches? It'd be
really nice if people could use -Wshadow and -Wcast-qual with Boost without
having to patch it first.

Thanks!
Stephan T. Lavavej


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