Boost logo

Boost :

Subject: Re: [boost] Win64 and abi_prefix.hpp/abi_suffix.hpp warnings
From: Sebastian Redl (sebastian.redl_at_[hidden])
Date: 2008-09-25 11:07:54


Chris Newbold wrote:
> Here's an alternate proposal that does work: add a warning suppression to config/abi/msvc_prefix.hpp:
>
> @@ -3,6 +3,18 @@
> // Boost Software License, Version 1.0. (See accompanying file
> // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
>
> +#if defined(_M_X64)
> + // warning: 'file': alignment changed after including header, may
> + // be due to missing #pragma pack(pop)
> + //
> + // Changing the default structure alignment across header file
> + // boundaries causes a warning on the x86_64 target. Unfortunately,
> + // there is no way to do a push-pop on the state of this warning
> + // since popping it back to the 'on' state results in a warning as
> + // the compiler exits the suffix file
> +# pragma warning(disable:4103)
> +#endif
> +
> #pragma pack(push,8)
>
> Does this seem reasonable?
>
I'd say msvc_suffix should reenable the warning with #pragma
warning(default:4103).

Sebastian


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