[Boost-bugs] [Boost C++ Libraries] #3329: Boost::Statechart: Shadow Variables Cause Warnings/Errors When Headers Are Not in System Path

Subject: [Boost-bugs] [Boost C++ Libraries] #3329: Boost::Statechart: Shadow Variables Cause Warnings/Errors When Headers Are Not in System Path
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2009-08-09 23:08:03


#3329: Boost::Statechart: Shadow Variables Cause Warnings/Errors When Headers Are
Not in System Path
--------------------------------------+-------------------------------------
 Reporter: gerickson@… | Owner: andreas_huber69
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: statechart
  Version: Boost 1.39.0 | Severity: Problem
 Keywords: |
--------------------------------------+-------------------------------------
 I've recently added Boost 1.39.0 to an Xcode 3.1.3 project with the
 following warnings enabled in GCC/G++ 4.0.1:

 -Werror -Wreturn-type -Wunused-function -Wunused-label -Wunused-variable
 -Wshadow

 Unfortunately, when boost is not installed in a "system" path--as is the
 case here--unused and shadow variable warnings cause the build to fail
 when warnings are treated as errors.

 The included header is:

 boost/statechart/result.hpp

 To test and fix, I isolated with:

 printf "#include <${BoostHeader}>\nint main(void) { return 0; }" |
 /Developer/usr/bin/gcc-4.0 -x c++ -Wall -Wshadow -Werror -o test
 -I${BoostRoot}/boost/include -

 The patch to address this is attached.

 Because this problem seems to come up frequently in all Boost subsystems,
 perhaps there is a way -Wshadow and -Wall can be forced for all unit
 tests?

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/3329>
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:01 UTC