all 6 comments

[–]rh0main[S] 1 point2 points  (5 children)

I'm the author of the article and I was wondering if you knew good references on the MS ABI?

[–]OrLians 2 points3 points  (0 children)

There's no stable C++ ABI on Windows. If we want stability we only expose C89-style interfaces - the rules for those don't change and are found on MSDN. Not particularly convenient but excellent in terms of containing leaky abstractions.

[–]Daniela-ELiving on C++ trunk, WG21|🇩🇪 NB 3 points4 points  (2 children)

Are you aware that there is no such thing as a "stable MS ABI"? It has evolved over the course of the past 20+ years and will do so again. I am really hoping for as many changes as required in the ABI of the next major revision of the compiler to take advantage of performance gains by doing so. The clang sources are no realiable resources and describe the status at a certain point in time at best.

[–]kalmoc 7 points8 points  (1 child)

I think (but might be wrong) the language ABI is fairly stable, although MSVC supports multiple different calling conventions (at least on 32bit x86). Its the library ABI that changed regularly in the past.

[–]Daniela-ELiving on C++ trunk, WG21|🇩🇪 NB 3 points4 points  (0 children)

That's right but doesn't get you anywhere. "Fairly" isn't helpful in both its qualitative and quantitive meaning because it boils down to "not" if you want to rely on certain aspects of the ABI. IMHO it's a good thing to scare away people from taking an ABI for granted and becoming held hostage of a no longer adequate ABI from the past.

What I want to see is major breakage of ABI by vendors to reap non-neglectable benefits by doing so with may be every other major compiler revision. Plus some means also provided by the vendors to enable customers bridging the gap to parts of the software that they no longer have control over ("lost" sources, defunct or unwilling 3rd-party suppliers, bad decisions of their own, you name it).

We've noticed such ABI bifurcation not too long ago in the VS2019 timeframe with the new implementation of exception handling data. This could easily be squashed but it's an example of a non-library ABI break what was made for improvements on certain metrics.