Opened 13 years ago

Closed 13 years ago

#3830 closed Patches (fixed)

gcc-3.3 -W dislikes "void inline" in serialization/throw_exception.hpp

Reported by: Martin Dorey <mdorey@…> Owned by: Robert Ramey
Milestone: Component: serialization
Version: Boost 1.39.0 Severity: Problem
Keywords: Cc:

Description

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@whitewater:~/playpen/boost-void-inline$ cat use-mic.cpp #include <boost/multi_index_container.hpp> 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,

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@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.

Attachments (1)

void-inline.patch (396 bytes ) - added by Martin Dorey <mdorey@…> 13 years ago.
suggested fix

Download all attachments as: .zip

Change History (2)

by Martin Dorey <mdorey@…>, 13 years ago

Attachment: void-inline.patch added

suggested fix

comment:1 by Robert Ramey, 13 years ago

Resolution: fixed
Status: newclosed

At least you didn't mark it "showstopper".

I've made the change in my local copy from where it will migrate to trunk and eventually release.

Robert Ramey

Note: See TracTickets for help on using tickets.