Boost logo

Boost :

From: Joaquín Mª López Muñoz (joaquin_at_[hidden])
Date: 2005-10-14 04:00:02


Angus Leeming ha escrito:

> Compiling the attached code with g++ 3.4.4 as
> g++ -Wundef -Iboost/cvs -o trial trial.cpp
> produces a heap of warnings
> warning: "__BORLANDC__" is not defined
> warning: "_MSC_FULL_VER" is not defined
> warning: "__MWERKS__" is not defined
>
> The warnings are produced by code like:
> #if BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3003))
>
> and are, of course, silenced by:
> #if defined(__MWERKS__) && \
> BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3003))
>
> Grepping around the boost sources, I see that my 'fix' has been applied
> about 70 times already in the 1260 uses of BOOST_WORKAROUND. Assuming that
> the lack of consistency reflects only the size of the task, I've made a
> patch applying the fix to Boost.Random. Chipping away at the block...
>

But I think it makes much more sense if BOOST_WORKAROUND itself includes
the patch, so that instead of its current definition

# define BOOST_WORKAROUND(symbol, test) \
        ((symbol != 0) && (1 % (( (symbol test) ) + 1)))

it looks like

# define BOOST_WORKAROUND(symbol, test) \
        (defined(symbol) && (symbol != 0) && (1 % (( (symbol test) ) + 1)))

Anyone sees some problem with this?

Best,

Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo

>
> Hoping that this is useful,
> Angus
>
> ------------------------------------------------------------------------
> Name: random.diff
> random.diff Type: text/x-diff
> Encoding: 8Bit
>
> Name: trial.cpp
> trial.cpp Type: Archivo de código fuente de C++ (application/x-unknown-content-type-cppfile)
> Encoding: 8Bit
>
> ------------------------------------------------------------------------
> _______________________________________________
> Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost


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