Boost C++ Libraries: Ticket #11240: tons of warnings about unused local typedefs with clang++ https://svn.boost.org/trac10/ticket/11240 <p> When compiling anything using <code>BOOST_RANGE_CONCEPT_ASSERT()</code> clang++ emits tons of warnings about used local typedefs if compiled with <code>-Wall</code>. </p> <p> This is a regression compared to 1.57.0. </p> <p> Trivial example program: </p> <pre class="wiki">#include &lt;vector&gt; #include &lt;boost/range/algorithm.hpp&gt; int main(int, char**) { std::vector&lt;int&gt; v; boost::range::sort(v); } </pre><p> Compiled with: </p> <pre class="wiki">clang++ -Wall -I$HOME/opt/boost/boost_1_58_0/include/ \ -L$HOME/opt/boost/boost_1_58_0/lib/ -o cpp1 cpp1.cpp </pre><p> Output (excerpt): </p> <pre class="wiki">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. </pre><p> These are 313 warnings for that trivial example program above. </p> <p> g++ 4.9.2 does not emit such warnings, with neither version. </p> <p> clang++ 3.6.0 emits those warnings with Boost 1.58.0 but not with 1.57.0 or earlier. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/11240 Trac 1.4.3 viboes Tue, 28 Apr 2015 14:51:30 GMT <link>https://svn.boost.org/trac10/ticket/11240#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/11240#comment:1</guid> <description> <p> You can use the corresponding -Wno-.... isn't it? </p> </description> <category>Ticket</category> </item> <item> <dc:creator>viboes</dc:creator> <pubDate>Tue, 28 Apr 2015 14:53:35 GMT</pubDate> <title>status changed; resolution set https://svn.boost.org/trac10/ticket/11240#comment:2 https://svn.boost.org/trac10/ticket/11240#comment:2 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">duplicate</span> </li> </ul> <p> Duplicate <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/11239" title="#11239: Bugs: clang++ emits lots of warnings about unused local defines (closed: duplicate)">#11239</a> </p> Ticket viboes Tue, 28 Apr 2015 14:55:22 GMT status changed; resolution deleted https://svn.boost.org/trac10/ticket/11240#comment:3 https://svn.boost.org/trac10/ticket/11240#comment:3 <ul> <li><strong>status</strong> <span class="trac-field-old">closed</span> → <span class="trac-field-new">reopened</span> </li> <li><strong>resolution</strong> <span class="trac-field-deleted">duplicate</span> </li> </ul> Ticket Moritz Bunkus <moritz@…> Tue, 28 Apr 2015 18:40:30 GMT <link>https://svn.boost.org/trac10/ticket/11240#comment:4 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/11240#comment:4</guid> <description> <p> 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. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>John Maddock</dc:creator> <pubDate>Mon, 04 May 2015 11:25:38 GMT</pubDate> <title>component changed https://svn.boost.org/trac10/ticket/11240#comment:5 https://svn.boost.org/trac10/ticket/11240#comment:5 <ul> <li><strong>component</strong> <span class="trac-field-old">None</span> → <span class="trac-field-new">range</span> </li> </ul> Ticket