Boost logo

Boost :

Subject: Re: [boost] [scope_exit] trunk tests fail on sun compiler
From: lcaminiti (lorcaminiti_at_[hidden])
Date: 2012-04-04 17:27:39


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__ :)

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?

Thanks.
--Lorenzo

--
View this message in context: http://boost.2283326.n4.nabble.com/boost-scope-exit-trunk-tests-fail-on-sun-compiler-tp4501546p4533230.html
Sent from the Boost - Dev mailing list archive at Nabble.com.

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