[Boost-bugs] [Boost C++ Libraries] #3830: gcc-3.3 -W dislikes "void inline" in serialization/throw_exception.hpp

Subject: [Boost-bugs] [Boost C++ Libraries] #3830: gcc-3.3 -W dislikes "void inline" in serialization/throw_exception.hpp
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2010-01-09 02:09:22


#3830: gcc-3.3 -W dislikes "void inline" in serialization/throw_exception.hpp
-----------------------------------------------+----------------------------
 Reporter: Martin Dorey <mdorey@…> | Owner: ramey
     Type: Patches | Status: new
Milestone: | Component: serialization
  Version: Boost 1.39.0 | Severity: Problem
 Keywords: |
-----------------------------------------------+----------------------------
 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!

 martind_at_whitewater:~/playpen/boost-void-inline$ cat use-mic.cpp
 #include <boost/multi_index_container.hpp>
 martind_at_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,
                  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:
 /home/martind/work/3rdParty/boost_1_39_0/boost/serialization/throw_exception.hpp:29:
 warning: `
    inline' is not at beginning of declaration
 martind_at_whitewater:~/playpen/boost-void-inline$

 If you haven't given up reading in disgust already, I do have a little
 supporting evidence. The "problem" code...

 void inline throw_exception(std::exception const & e) {

 ... is still there in the latest version:

 http://svn.boost.org/svn/boost/trunk/boost/serialization/throw_exception.hpp

 This "bug" could easily be resolved, by transposing "void" and "inline".

 A "bug" report on a similar issue elsewhere was received favorably, in
 this thread:

 http://lists.boost.org/boost-users/2008/08/39572.php

 I searched for existing bugs for this, finding only the bug where the
 "inline" was perhaps added:

 https://svn.boost.org/trac/boost/ticket/2947

 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.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/3830>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:02 UTC