Boost logo

Boost :

From: Pavel Vozenilek (pavel_vozenilek_at_[hidden])
Date: 2007-01-27 18:50:45


"Marshall Clow" wrote:

> I'm trying to assign all the "nobody" bugs to the appropriate people.
> This one is titled:
>
> Warnings on MSVC 2005
>
> and has to do with #pragma push () and #pragma pop () generating
> warnings.
>
> Here's a direct link:
> <http://sourceforge.net/tracker/index.php?func=detail&aid=1596577&group_id=7586&atid=107586>
>

----------a Boost header------------
#include <boost/config.hpp>
#include <boost/detail/workaround.hpp>

#if BOOST_WORKAROUND(BOOST_MSVC, <= 1400) // up to VC8
# pragma warning (disable : 4103)
#endif

#ifdef BOOST_HAS_ABI_HEADERS
# include BOOST_ABI_PREFIX
#endif

...

#ifdef BOOST_HAS_ABI_HEADERS
# include BOOST_ABI_SUFFIX
#endif

#if BOOST_WORKAROUND(BOOST_MSVC, <= 1400)
# pragma warning (default : 4103)
#endif
----------end of Boost header -----------

The main points (tested with VC8, problem said to be
present since VC4.x) are:

* The re-enabling #pragma warning needs to be placed
  outside the header containing
  #pragma pack(pop).

* Both #pragma warning (disable) and
  #pragma warning (default) need to be in the same file

With any other layout VC8 generates the warning.

Fixing the problem would require modifying every single
header that includes the BOOST_ABI_{PRE|SUF}FIX.

/Pavel


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