Subject: Re: [boost] [wiki] Warning Guidelines for VC
From: "Stephan T. Lavavej" <[email-masked]>
To: <[email-masked]>
Date: Fri, 31 Dec 2010 17:00:31 -0000

[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