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

Bjorn Reese breese at mail1.stofanet.dk
Fri Aug 6 07:19:49 PDT 2010


On 2010-08-06 15:45, David Chisnall wrote:
> On 6 Aug 2010, at 14:21, Douglas Gregor wrote:
>
>> I wonder how much will break if we start defining _MSC_VER? Does anyone know how mingw deals with this?
>
> We already define the GCC version macros so that we can act as a drop-in replacement for GCC.  If we're aiming to act as a drop-in replacement for MSVC then it would make sense to define their version macros and treat any incompatibilities in MS-extensions mode as bugs, just as we treat incompatibilities with GCC in GNU C modes as bugs.

Defining _MSC_VER or __GNUC__ or any other macro that identifies another
compiler is a problem because it makes it very difficult to handle
differences or defects via predefined macros.

Many projects rely on this, e.g. boost, wxwidget, and indeed your own
libcxx.



More information about the cfe-dev mailing list