Opened 8 years ago

Closed 8 years ago

#3276 closed Bugs (fixed)

Boost::Accumulators::Statistics: Unused Variables and Globals Cause Warnings/Errors When Headers Are Not in System Path

Reported by: gerickson@… Owned by: Eric Niebler
Milestone: To Be Determined Component: accumulator
Version: Boost 1.39.0 Severity: Problem
Keywords: Cc:


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. This issue last came up for me about a year ago in 1_35_0 with filesystem.hpp:

The included headers this time are:


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 -Wreturn-type -Wunused-function -Wunused-label -Wunused-parameter -Wunused-variable -Wunused-value -o test -I${BoostRoot?}/boost/include -

The patches to address this are attached and impact the headers below:


Attachments (1)

boost-04.patch (561 bytes) - added by gerickson@… 8 years ago.

Download all attachments as: .zip

Change History (3)

Changed 8 years ago by gerickson@…

Attachment: boost-04.patch added

comment:1 Changed 8 years ago by Eric Niebler

Status: newassigned

comment:2 Changed 8 years ago by Eric Niebler

Resolution: fixed
Status: assignedclosed

(In [55050]) eliminate shadow warnings and unused variable warnings, fixes #3262, fixed #3276, fixes #3031

Modify Ticket

Change Properties
Set your email in Preferences
as closed The owner will remain Eric Niebler.
The resolution will be deleted.

Add Comment

E-mail address and name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.