Opened 7 years ago
Last modified 7 years ago
#11240 reopened Bugs
tons of warnings about unused local typedefs with clang++
Reported by: | Owned by: | ||
---|---|---|---|
Milestone: | To Be Determined | Component: | range |
Version: | Boost 1.58.0 | Severity: | Regression |
Keywords: | Cc: |
Description
When compiling anything using BOOST_RANGE_CONCEPT_ASSERT()
clang++ emits tons of warnings about used local typedefs if compiled with -Wall
.
This is a regression compared to 1.57.0.
Trivial example program:
#include <vector> #include <boost/range/algorithm.hpp> int main(int, char**) { std::vector<int> v; boost::range::sort(v); }
Compiled with:
clang++ -Wall -I$HOME/opt/boost/boost_1_58_0/include/ \ -L$HOME/opt/boost/boost_1_58_0/lib/ -o cpp1 cpp1.cpp
Output (excerpt):
In file included from cpp1.cpp:46: In file included from /home/mosu/opt/boost/boost_1_58_0/include/boost/range/algorithm.hpp:29: In file included from /home/mosu/opt/boost/boost_1_58_0/include/boost/range/concepts.hpp:19: /home/mosu/opt/boost/boost_1_58_0/include/boost/concept_check.hpp:51:7: warning: unused typedef 'boost_concept_check51' [-Wunused-local-typedef] BOOST_CONCEPT_ASSERT((Model)); … … 313 warnings generated.
These are 313 warnings for that trivial example program above.
g++ 4.9.2 does not emit such warnings, with neither version.
clang++ 3.6.0 emits those warnings with Boost 1.58.0 but not with 1.57.0 or earlier.
Change History (5)
comment:1 by , 7 years ago
comment:3 by , 7 years ago
Resolution: | duplicate |
---|---|
Status: | closed → reopened |
comment:4 by , 7 years ago
Of course I can find workarounds. I can use that option. Or drop -Wextra. Or not use clang++. Or chose to stay with Boost 1.57.0. None of that sounds like a solution. As I've pointed out prior versions of Boost didn't exhibit this behavior, and I actually like having warnings enabled for code that I write, and having a third-party library I use emit hundreds of warnings totally defeats that purpose. Encouraging application developers not to use warnings seems somewhat dangerous ground, too. Now if you tell me that there's technical reason why this typedef is really, really required and that the code wouldn't work otherwise then that would be something to consider. But until then I consider this a bug, and a regression.
comment:5 by , 7 years ago
Component: | None → range |
---|
You can use the corresponding -Wno-.... isn't it?