Boost logo

Boost :

Subject: Re: [boost] [wiki] Warning Guidelines for VC
From: Stephan T. Lavavej (stl_at_[hidden])
Date: 2010-12-31 12:00:31


[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.


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