Boost logo

Boost :

Subject: Re: [boost] Exception visibility and non-GCC compilers
From: Emil Dotchevski (emildotchevski_at_[hidden])
Date: 2012-04-30 15:35:12


On Mon, Apr 30, 2012 at 11:57 AM, Mathias Gaunard <
mathias.gaunard_at_[hidden]> wrote:

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

No, it isn't a bug. I've been careful to keep boost/exception/exception.hpp
extremely lightweight, it does not include any header files, not even
system header files. Of course, if there are actual bugs (as in, Boost
Exception is not working on some platform or compiler), please do file
tickets for them.

Emil Dotchevski
Reverge Studios, Inc.
http://www.revergestudios.com/reblog/index.php?n=ReCode


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk