Boost logo

Boost :

From: Gennaro Prota (gennaro_prota_at_[hidden])
Date: 2006-06-14 09:51:57

On Wed, 14 Jun 2006 15:45:24 +0200, Gennaro Prota
<gennaro_prota_at_[hidden]> wrote:

>Hi guys,
>I tried a couple of compilations on the CVS trunk and it appears that
>gcc's -Wundef option is basically unusable, due to most usages of
>BOOST_WORKAROUND not being prefixed by a corresponding "defined
>expression". Now, I'm thinking: if a suitable pragma exists (I'll look
>it up) could we just disable that warning at the config system level?
>I know this impacts non-boost user code as well but, whatever that
>implies, we have a precedent for Visual C++:
>// turn off the warnings before we #include anything
>#pragma warning( disable : 4503 ) // warning: decorated name length

Actually there was a similar discussion a couple of years ago. My
preferred solution is still the one I proposed at that time: defining
*all* compiler identification macros, always: all of them would be
zero except the one for the compiler being used. This requires n
#defines to zero in one place (where n is the number of compilers we
support), plus in each compiler-config file an undef/redef such as:

#define BOOST_THIS_COMPILER version

This would completely solve the problem without any user impact
(unless some company decides to ship a compiler having version "zero"!


Boost list run by bdawes at, gregod at, cpdaniel at, john at