Boost logo

Boost :

Subject: Re: [boost] [scope_exit] trunk tests fail on sun compiler
From: Vicente J. Botet Escriba (vicente.botet_at_[hidden])
Date: 2012-04-04 17:49:09


Le 04/04/12 23:27, lcaminiti a écrit :
> Vicente Botet wrote
>> <toolset>sun:<define>BOOST_TYPEOF_EMULATION
>>
> Actually adding this to the Jamfile:
>
> <toolset>sun:<define>__typeof__=__typeof__
>
> is a better workaround because having __typeof__ defined will prevent
> Boost.Config from defining it to "typeof":
>
> ...
> # ifndef __typeof__
> # define __typeof__ typeof // boost/config/platform/linux.hpp:103
> # endif
> ...
>
> So Boost.Typeof will be able to use Sun's native __typeof__ :)

Glad to see that you have found the origin of the incoherency. I'll
apply your method soon waiting for a solution in Boost.Config.
I'm wondering if this will not remove a lot of failing test with this
compiler.
>
> We still should fix the actual issue in Boost.Config -- but I'm not sure
> how... maybe replacing __GNUC__:
>
> // boost/config/platform/linux.hpp
> #ifndef __GNUC__
> //
> // if the compiler is not gcc we still need to be able to parse
> // the GNU system headers, some of which (mainly<stdint.h>)
> // use GNU specific extensions:
> //
> //...
> # ifndef __typeof__
> # define __typeof__ typeof // boost/config/platform/linux.hpp:103
> # endif
>
> with:
>
> #if !defined(__GNUC__)&& (!defined(__SUNPRO_CC) || __SUNPRO_CC< 0x590)
>
> Note that Sun has __typeof__ since version 5.9.
>
> But I'm not familiar enough with the Boost.Config platform stuff to make any
> change to it... any taker?
>
>
This seems a good starting workaround. John, do you agree with it?

Good work,
Vicente


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