Boost logo

Boost :

Subject: Re: [boost] [wiki] Warning Guidelines for VC
From: Paul A. Bristow (pbristow_at_[hidden])
Date: 2011-01-07 07:56:54


> > -----Original Message-----
> > From: boost-bounces_at_[hidden]
> > [mailto:boost-bounces_at_[hidden]]
> > On Behalf Of Michael Caisse
> > Sent: Saturday, January 01, 2011 12:12 AM
> > To: boost_at_[hidden]
> > Subject: Re: [boost] [wiki] Warning Guidelines for VC

> I don't see how the flag actually could help unless you were
> developing only on MSVC and then trying to port to other platforms.

> > But I think this is exactly what is true for many developers, so the
earlier the MS-
> > only users get warning that they are in MS-only-land the better. I had
hoped
> > that /Za would achieve this.
 
> > > So unless there are other views, I propose to change the 'Dealing
> > > with warnings guidelines' to warn that the option is 'definitely
dodgy'.
> > > (mainly by a link to this helpful post).
> > >
> > > Although /Za might help a MSVC-only-shop a little during development,
loading and
> > > testing on the trunk remains the definitive test of portability.
>
> I am moving towards Michael's viewpoint, but
> I'd like more views on this before I make a change.

In the absence of other views, I will change (when I can login ;-)

 the 'guidelines' page as above

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

including a reference to

Stephen's informative and authoritative MSVC /Za summary at

http://article.gmane.org/gmane.comp.lib.boost.devel/212186/

Paul

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

attached mail follows:


[Paul A. Bristow]
> So it would seem that there is no reliable way to determine if any
> code (including STL) is C++ Standard Conforming, apart from trying
> to compile it on a non-Microsoft Standard Conforming Compiler in
> strict mode?

I personally characterize VC's compiler front-end C1XX as "pretty
conformant" (*), but like all compilers it contains bugs and extensions of
varying number, severity, and crawling evil. /Za had limited usefulness even
before it became broken in VC10 because (a) according to my understanding it
disabled some but not all extensions, (b) most of the extensions disabled by
/Za would trigger warnings in its absence (notably the Evil Extension
allowing modifiable lvalue references to bind to temporaries) at least at
/W4 which is the warning level that everyone should use at a minimum, (c) it
did nothing about bugs (I'd love to see THAT switch), (d) it also did
nothing about unimplemented features (notably two-stage name lookup -
dynamic exception specifications have been deprecated and export has finally
been removed, yay). Over the years I've seen VC, GCC, and EDG disagree, with
each of them being right and wrong in various cases. That's not to say that
they're equally conformant,
  but after seeing rejects-valid and accepts-invalid behavior everywhere,
you can't really trust a single compiler. Verifying portability by testing
with multiple compilers, as Boost does, is the only reasonable course of
action. (As EDG powers VC10+ Intellisense, we now test that our C++ Standard
Library implementation compiles with EDG - if it doesn't, users will see
spurious red squiggles in the IDE.)

STL
(*) Only the latest version.
_______________________________________________
Unsubscribe & other changes:
http://lists.boost.org/mailman/listinfo.cgi/boost


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