[cfe-dev] Extra #defines for Windows SDK 6.0a/VS2008

Dimitry Andric dimitry at andric.com
Fri Aug 6 10:21:53 PDT 2010


On 2010-08-06 17:11, Douglas Gregor wrote:
> This will only confuse users, who are accustomed to the marketing numbers like 8.0, 9.0, 1.0 or VS 2005, 2008, 2010, and we will never be emulating anything prior to 7.1.

Microsoft has defined _MSC_VER as follows:

Visual Studio 6:           _MSC_VER=1200
Visual Studio .NET 2002:   _MSC_VER=1300
Visual Studio .NET 2003:   _MSC_VER=1310
Visual Studio 2005:        _MSC_VER=1400
Visual Studio 2008:        _MSC_VER=1500
Visual Studio 2010:        _MSC_VER=1600

So if you had checks in your code to specialize things for specific MS
compiler versions, you already had to know this "internal" version
number anyway. :)

That said, it should be easy enough to accept multiple forms on the
clang command line, as long as they are not ambiguous, e.g:

-fmsc-ver=1200    -fmsc-ver=vs6
-fmsc-ver=1300    -fmsc-ver=vs7    -fmsc-ver=vs2002
-fmsc-ver=1310    -fmsc-ver=vs71   -fmsc-ver=vs2003
-fmsc-ver=1400    -fmsc-ver=vs8    -fmsc-ver=vs2005
-fmsc-ver=1500    -fmsc-ver=vs9    -fmsc-ver=vs2008
-fmsc-ver=1600    -fmsc-ver=vs10   -fmsc-ver=vs2010



More information about the cfe-dev mailing list