[cfe-dev] [LLVMdev] Handling SRet on Windows x86

Óscar Fuentes ofv at wanadoo.es
Thu Mar 28 03:39:03 PDT 2013

Chandler Carruth <chandlerc at google.com> writes:

>> And here there is no "Windows ABI" here at all. Because every compiler
>> (MSVC, gcc / clang, Borland) does its own stuff. This is why I said
>> that the proposal naming is confusing.
> I don't know anything about Borland, and I don't think that matters. But I
> think that the Windows ABI is, and really must be, the ABI followed by the
> system compiler: MSVC.

MSVC is not the system compiler. Certainly, it is not distributed with
the system. Actually, MSVC was a secondary player on Windows for a long
time, with several other C++ ABI-incompatible options available.

> That's the standard for the platform, and I think it
> is actively confusing to say that the "Windows ABI" could mean anything
> other than what MSVC as the standard system compiler does. It certainly
> should have nothing to do with mingw or cygwin.

This is so wrong.

OTOH, do you really want to present MSVC++ as the canonical Windows
compiler? That not only puts down MinGW (let's forget about the
propietary Borland/Embarcadero compiler for a moment) but it is against
Clang++ too, which is not going to reach MSVC++ compatibility anytime
soon, but it is not far away from being usable for Windows development,
as MinGW g++ is. You are effectively proposing that we should send the
message that Clang++ is a second class citizen on Windows development.

> This is why I suggest that the Windows ABI is whatever MSVC happens to
> do.

There is another argument against that: the MSVC++ ABI is undocumented.
The real "Windows ABI" (i.e. what your compiler needs to do for
interfacing with the OS) is not.

More information about the cfe-dev mailing list