Boost C++ Libraries: Ticket #8549: Add a BOOST_ATTRIBUTE_UNUSED macro https://svn.boost.org/trac10/ticket/8549 <p> Please take a look at <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/8546" title="#8546: Bugs: GCC 4.8 warns unused local typedef (closed: fixed)">#8546</a> </p> <pre class="wiki">#if defined(__GNUC__) &amp;&amp; ((__GNUC__ &gt; 4) || ((__GNUC__ == 4) &amp;&amp; (__GNUC_MINOR__ &gt;= 7))) # define BOOST_ATTRIBUTE_UNUSED __attribute__((unused)) #else # define BOOST_ATTRIBUTE_UNUSED #endif </pre> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/8549 Trac 1.4.3 Neil Groves Sun, 15 Sep 2013 19:29:49 GMT <link>https://svn.boost.org/trac10/ticket/8549#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/8549#comment:1</guid> <description> <p> I've found this to be a general problem which has a scope across many of our Boost libraries. Having the definition in boost/concept/detail/general.hpp is not sufficient. There are cases in Boost.Tuple, Boost.Bind and my Boost.Range library. I would love to be tackling and removing these annoying warnings, but I would like to avoid duplicating the unused attribute declaration. I am currently duplicating the attribute unused idiom in Boost.Range and attempting to ignore the noise from these warnings from other libraries. </p> <p> I would be happy to be assigned this defect and sort this problem out if this helps. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Mathias Gaunard</dc:creator> <pubDate>Tue, 30 Sep 2014 07:29:42 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/8549#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/8549#comment:2</guid> <description> <p> The unused attribute has existed since the 3.x days, I suggest enabling it with 4.x variants. Even if no warning is emitted, it doesn't hurt, and it will also take care of Clang for free. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>John Maddock</dc:creator> <pubDate>Sat, 11 Oct 2014 12:12:56 GMT</pubDate> <title>status changed; resolution set https://svn.boost.org/trac10/ticket/8549#comment:3 https://svn.boost.org/trac10/ticket/8549#comment:3 <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">fixed</span> </li> </ul> <p> Done in <a class="ext-link" href="https://github.com/boostorg/config/commit/003d33725e72ec5da953b927a51b25deafae242c"><span class="icon">​</span>https://github.com/boostorg/config/commit/003d33725e72ec5da953b927a51b25deafae242c</a> </p> Ticket