Re: [Boost-bugs] [Boost C++ Libraries] #9378: g++ 4.7 -Wshadow warnings need attention

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #9378: g++ 4.7 -Wshadow warnings need attention
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2014-03-19 01:37:02


#9378: g++ 4.7 -Wshadow warnings need attention
------------------------------------------+--------------------------
  Reporter: Tom Browder <tom.browder@…> | Owner: eric_niebler
      Type: Bugs | Status: new
 Milestone: To Be Determined | Component: xpressive
   Version: Boost 1.55.0 | Severity: Problem
Resolution: | Keywords:
------------------------------------------+--------------------------

Comment (by steven_watanabe):

 Replying to [comment:8 anonymous]:
> But code that prevents us from taking advantage of the compiler makes it
 harder for us to write good code.
>

 I have no objection to you using this warning
 for your own code. I almost always end up creating
 a pair of headers disable_warnings.hpp and enable_warnings.hpp
 that I use to wrap all the code in a library.

> Boost itself can benefit from not shadowing variables,

 This is highly doubtful. I've seen too many cases where
 "fixing" one warning only created a different warning
 (possibly with another compiler) or worse, introduced a
 bug because someone was blindly following the compiler's
 suggestions without fully understanding the consequences
 of each change. There's really no such thing as a trivial
 change, and considering the effort required, the chances
 of introducing new problems, and the likelihood of finding
 a real bug, I simply don't consider it worthwhile to make
 these changes in a large existing code base.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/9378#comment:9>
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:15 UTC