Boost C++ Libraries: Ticket #3830: gcc-3.3 -W dislikes "void inline" in serialization/throw_exception.hpp https://svn.boost.org/trac10/ticket/3830 <p> I realize that this is perfectly legal code, "only" a warning and a non-default one at that, not to mention one that's only issued by an old compiler, and only then when a minority-interest -fno-exceptions switch is passed. To add insult to injury, I'm reporting the bug against an old version of Boost! </p> <p> martind@whitewater:~/playpen/boost-void-inline$ cat use-mic.cpp #include &lt;boost/multi_index_container.hpp&gt; martind@whitewater:~/playpen/boost-void-inline$ gcc -V3.3 -fno-exceptions -I ~/work/3rdParty/boost_1_39_0/ -W -c use-mic.cpp In file included from /home/martind/work/3rdParty/boost_1_39_0/boost/serialization/serialization.hpp:16, </p> <blockquote> <p> from /home/martind/work/3rdParty/boost_1_39_0/boost/multi_index/detail/archive_constructed.hpp:19, from /home/martind/work/3rdParty/boost_1_39_0/boost/multi_index_container.hpp:46, from use-mic.cpp:1: </p> </blockquote> <p> /home/martind/work/3rdParty/boost_1_39_0/boost/serialization/throw_exception.hpp:29: warning: ` </p> <blockquote> <p> inline' is not at beginning of declaration </p> </blockquote> <p> martind@whitewater:~/playpen/boost-void-inline$ </p> <p> If you haven't given up reading in disgust already, I do have a little supporting evidence. The "problem" code... </p> <p> void inline throw_exception(std::exception const &amp; e) { </p> <p> ... is still there in the latest version: </p> <p> <a class="ext-link" href="http://svn.boost.org/svn/boost/trunk/boost/serialization/throw_exception.hpp"><span class="icon">​</span>http://svn.boost.org/svn/boost/trunk/boost/serialization/throw_exception.hpp</a> </p> <p> This "bug" could easily be resolved, by transposing "void" and "inline". </p> <p> A "bug" report on a similar issue elsewhere was received favorably, in this thread: </p> <p> <a class="ext-link" href="http://lists.boost.org/boost-users/2008/08/39572.php"><span class="icon">​</span>http://lists.boost.org/boost-users/2008/08/39572.php</a> </p> <p> I searched for existing bugs for this, finding only the bug where the "inline" was perhaps added: </p> <p> <a class="ext-link" href="https://svn.boost.org/trac/boost/ticket/2947"><span class="icon">​</span>https://svn.boost.org/trac/boost/ticket/2947</a> </p> <p> Sorry, again, for the spam. Good conscience requires me to submit our local patch upstream, for the benefit of anyone else in a similar position. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/3830 Trac 1.4.3 Martin Dorey <mdorey@…> Sat, 09 Jan 2010 02:09:46 GMT attachment set https://svn.boost.org/trac10/ticket/3830 https://svn.boost.org/trac10/ticket/3830 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">void-inline.patch</span> </li> </ul> <p> suggested fix </p> Ticket Robert Ramey Thu, 28 Jan 2010 21:32:02 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/3830#comment:1 https://svn.boost.org/trac10/ticket/3830#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> At least you didn't mark it "showstopper". </p> <p> I've made the change in my local copy from where it will migrate to trunk and eventually release. </p> <p> Robert Ramey </p> Ticket