Boost logo

Boost :

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


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 :
>
> #if defined(__GNUC__)
> # if (__GNUC__ == 4 && __GNUC_MINOR__ >= 1) || (__GNUC__ > 4)
> # pragma GCC visibility push (default)
> # endif
> #endif
>
> ... some exception type being declared or defined
>
> #if defined(__GNUC__)
> # if (__GNUC__ == 4 && __GNUC_MINOR__ >= 1) || (__GNUC__ > 4)
> # pragma GCC visibility pop
> # endif
> #endif
>
> 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.

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