[cfe-commits] [PATCH] Add _M_IX86 for Windows

Eli Friedman eli.friedman at gmail.com
Tue Aug 18 12:47:50 PDT 2009


On Tue, Aug 18, 2009 at 7:01 AM, Anton
Korobeynikov<anton at korobeynikov.info> wrote:
> Hello, John
>
>> Adds _M_IX86 for the Windows target.
> That's not correct. And strictly speaking current windows target is
> not correct as well. This define (and _MSC_VER defined already) are
> vcpp-specific. They should not be defined neither for mingw (which
> uses current windows target) nor for generic windows target. Basically
> we need to have separate "VCPPCompatible" target which will derive
> from windows target and define vcpp-specific defines, hacks and
> quirks.

clang does not define _MSC_VER; it never has, and never will unless we
introduce a vcpp emulation mode, which I don't find particularly
likely.

Some quick web research shows _M_IX86 does not necessarily imply MSVC.
 Apparently Borland defines it, and the MinGW windows.h defines it if
the compiler doesn't.  I don't see any issue with defining it.

I'm not sure what the distinction between mingw and a "generic"
windows target is in this context.  And we currently default to
-fms-extensions on Windows, but it can be explicitly disabled.

-Eli



More information about the cfe-commits mailing list