[1.34][date-time][format][tokenizer] -Wshadow And -Wcast-qual Warnings, With Patches

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

On Sat, 25 Mar 2006 18:58:30 -0800, Stephan T. Lavavej wrote
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.)
I've fixed this on RC_1_34_0 and the main branch. Turns out this warning was actually pointing out some unecessary code -- so instead of the patch you supplied I just removed the uneeded code. Thx again for doing this before the release :-) Jeff
participants (2)
-
Jeff Garland
-
Stephan T. Lavavej