Boost logo

Boost Users :

Subject: Re: [Boost-users] warnings with VS2008 and Boost 1.44
From: Paul A. Bristow (pbristow_at_[hidden])
Date: 2010-10-29 13:41:55


> -----Original Message-----
> From: boost-users-bounces_at_[hidden] [mailto:boost-users-
> bounces_at_[hidden]] On Behalf Of Paul A. Bristow
> Sent: Friday, October 29, 2010 9:30 AM
> To: boost-users_at_[hidden]
> Subject: Re: [Boost-users] warnings with VS2008 and Boost 1.44
>
> > -----Original Message-----
> > From: boost-users-bounces_at_[hidden] [mailto:boost-users-
> > bounces_at_[hidden]] On Behalf Of Andrew Holden
> > Sent: Thursday, October 28, 2010 7:17 PM
> > To: boost-users_at_[hidden]
> > Subject: Re: [Boost-users] warnings with VS2008 and Boost 1.44
> >
> > On Thursday, October 28, 2010 11:02 AM, Paul A. Bristow wrote:
> > >> -----Original Message-----
> > >> From: boost-users-bounces_at_[hidden] [mailto:boost-users-
> > >> bounces_at_[hidden]] On Behalf Of gast128
> > >> Sent: Thursday, October 28, 2010 3:27 PM
> > >> To: boost-users_at_[hidden]
> > >> Subject: [Boost-users] warnings with VS2008 and Boost 1.44
>
> > > All these warnings look spurious, and I think you can safely enclose
> > and disable push'n'pop, as you suggest.
> >
> > Fair warning about Visual Studio: according to the help file at
> > http://msdn.microsoft.com/en-us/library/2c8f766e%28v=VS.90%29.aspx>

Limit also applies to VC2010 according to
http://msdn.microsoft.com/en-us/library/2c8f766e%28v=VS.100%29.aspx

> > > The compiler only supports up to 56 #pragma warning statements in a
> > compiland.
> >
> > It is my experience that the compiler will ignore any "#pragma warning"
> > lines after this limit has been reached, and it can be reached a lot
> faster than you might expect.

I'm sure it will happen easily when using Boost in Real Life.

I've updated
https://svn.boost.org/trac/boost/wiki/Guidelines/WarningsGuidelines

with this information.

It means that authors really ought to try to 'fix' warnings like this,
rather than using this suppress mechanism.

But I fear it means attempts to use warnings as errors globally
are doomed to be more trouble than they are worth,
mainly because some warnings are spurious (even MS admit this!) and are
unlikely to be fixed.

http://connect.microsoft.com/VisualStudio/feedback/details/586147/warning-c4
224-is-given-for-correct-code-if-ms-extensions-are-disabled

and like the poor, warnings will always be with us :-(

Paul

> ---
> Paul A. Bristow,
> Prizet Farmhouse, Kendal LA8 8AB UK
> +44 1539 561830 07714330204
> pbristow_at_[hidden]


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net