Subject: Re: [boost] Exception visibility and non-GCC compilers
From: Mathias Gaunard (mathias.gaunard_at_[hidden])
Date: 2012-04-30 14:57:20
On 30/04/12 20:34, Emil Dotchevski wrote:
> On Mon, Apr 30, 2012 at 11:02 AM, Mathias Gaunard<
> mathias.gaunard_at_[hidden]> wrote:
>> Exceptions types need to be exported so that shared libraries work
>> Currently, the only code I see that does this is in Boost.Exception :
>> But shouldn't we have macros to make this work with other compilers too?
>> I'm not sure all unix-like compilers pretend to be GCC 4.1+.
> Sure, if this causes a problem with any compiler, it should be fixed.
Looking at macros in Boost.Config, I found the macro
BOOST_SYMBOL_VISIBLE which seems to be for that purpose.
It is probably a bug that Boost.Exception does not use it, I'll file a
ticket for this.
It also might be a good idea to add a test that tests whether
throwing/catching boost::exception across shared library boundaries with
default hidden visibility works correctly.
The test would probably fail with Sun CC shared libraries compiled with
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk