Boost C++ Libraries: Ticket #8725: GCC 4.8 warns of ignored attribute in declaration https://svn.boost.org/trac10/ticket/8725 <p> When compiling with -Wall (GCC 4.8.0) the following warning is raised as an error: </p> <pre class="wiki">In file included from libs/program_options/src/variables_map.cpp:12:0: ./boost/program_options/variables_map.hpp:30:11: error: attribute ignored in declaration of ‘class boost::program_options::variables_map’ [-Werror=attributes] class variables_map; ^ ./boost/program_options/variables_map.hpp:30:11: note: attribute for ‘class boost::program_options::variables_map’ must follow the ‘class’ keyword </pre><p> This is caused by friend class declaration below having the attributes in the wrong order. Below is the simple fix. </p> <pre class="wiki">Index: boost/program_options/variables_map.hpp =================================================================== --- boost/program_options/variables_map.hpp (revision 84899) +++ boost/program_options/variables_map.hpp (working copy) @@ -98,7 +98,7 @@ void store(const basic_parsed_options&lt;char&gt;&amp; options, variables_map&amp; m, bool); - friend BOOST_PROGRAM_OPTIONS_DECL class variables_map; + friend class BOOST_PROGRAM_OPTIONS_DECL variables_map; }; /** Implements string-&gt;string mapping with convenient value casting </pre> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/8725 Trac 1.4.3 Chris Stylianou <chris5287@…> Mon, 24 Jun 2013 19:20:15 GMT attachment set https://svn.boost.org/trac10/ticket/8725 https://svn.boost.org/trac10/ticket/8725 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">patch-8725.txt</span> </li> </ul> Ticket Vladimir Prus Mon, 24 Jun 2013 19:37:38 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/8725#comment:1 https://svn.boost.org/trac10/ticket/8725#comment:1 <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> (In <a class="changeset" href="https://svn.boost.org/trac10/changeset/84903" title="Silence gcc warning. Thanks to Chris Stylianou. Closes #8725. ">[84903]</a>) Silence gcc warning. Thanks to Chris Stylianou. </p> <p> Closes <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/8725" title="#8725: Bugs: GCC 4.8 warns of ignored attribute in declaration (closed: fixed)">#8725</a>. </p> Ticket Chris Stylianou <chris5287@…> Sat, 19 Oct 2013 18:08:21 GMT <link>https://svn.boost.org/trac10/ticket/8725#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/8725#comment:2</guid> <description> <p> Will this be merged into release for 1.55? </p> </description> <category>Ticket</category> </item> </channel> </rss>