Boost logo

Boost :

Subject: Re: [boost] [Wiki] Changes in information about gcc warnings.
From: Paul A. Bristow (pbristow_at_[hidden])
Date: 2011-01-13 04:42:45


> -----Original Message-----
> From: boost-bounces_at_[hidden] [mailto:boost-bounces_at_[hidden]]
> On Behalf Of Stephan T. Lavavej
> Sent: Thursday, January 13, 2011 1:43 AM
> To: boost_at_[hidden]
> Subject: Re: [boost] [Wiki] Changes in information about gcc warnings.
>
> [Paul A. Bristow]
> > I'm only reporting what it says in
> > 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."
> > I'm not *quite* sure what that means either (or why even?).
>
> I asked Tanveer Gani, our compiler front-end dev lead, and he said that
this is
> simply incorrect: "Maybe "10^" got accidentally deleted? :-) I can't
imagine why
> there'd be a limit for the number of #pragma warnings and the warning
state
> stack uses linked nodes, not a static array."
>
> My own experiments have also encountered no such limit. I've filed a bug
> (DevDiv#122565) telling our doc team to remove this sentence.
>
Well that's very helpful - as well as quite amusing ;-) And Good News too.

(I'm kicking myself for not querying this before! 52 seemed a bizarre
number - we might be even more amused to know how it crept in).

> > But I suspect it explains why this method of warning suppression
> > doesn't always work.
>
> #pragma warning has surprising interactions with templates, and certain
> codegen warnings must be applied at the level of functions instead of
individual
> statements, but push/disable/pop by itself shouldn't have problems.

Thanks for this, which is duly noted and referenced in our document.

https://svn.boost.org/trac/boost/wiki/Guidelines/WarningsGuidelines

Paul

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

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