Boost logo

Boost Users :

Subject: Re: [Boost-users] warnings with VS2008 and Boost 1.44
From: Andrew Holden (aholden_at_[hidden])
Date: 2010-10-29 14:47:12


On Friday, October 29, 2010 1:42 PM, Paul A. Bristow wrote:
> > > 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.

It gets even easier when you include multiple products. A quick check
has found push'n'pop in the C++ standard library, Windows.h, Intel's
Threading Building Blocks, Boost, and our own code. I have some modules
that generate several hundred warnings when they would generate none if
not for this limit. Well, maybe one or two, but how will I ever find
them in all that noise?

> 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/warnin
g-c4
> 224-is-given-for-correct-code-if-ms-extensions-are-disabled

That's an amusing read. I especially enjoyed, "This warning is
off-by-default in the compiler, and can only be turned on with /Wall
(which is rare), or using /Za." In other words, Microsoft believes that
people who use warnings, by definition, don't exist!


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