
Angus Leeming <angus.leeming@btopenworld.com> writes:
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...
I object to adding all these specific silencing tests. IIRC we were going to handle this by creating boost macros for each compiler, similar to BOOST_MSVC, that were always #defined (possibly to 0), and using those in the BOOST_WORKAROUND tests. Otherwise, we will end up uglifying a lot of code, where BOOST_WORKAROUND is supposed to make the code much simpler and more readable. -- Dave Abrahams Boost Consulting www.boost-consulting.com