C++ Logo

std-proposals

Advanced search

Re: [std-proposals] Common ABI specification

From: Jens Maurer <jens.maurer_at_[hidden]>
Date: Sat, 28 Jan 2023 00:43:09 +0100
On 28/01/2023 00.04, samuel ammonius wrote:
> I agree that C++ compilers are doing pretty good in being
> compatible with each other, but it's still good to have a fixed
> standard that developers can count on. With a standard name
> mangling scheme, C++ developers can ship precompiled
> libraries and be confident that they should work for developers
> using them. Developers in other languages can alias the full
> mangled name of a C++ function without worrying that it
> won't work on different compilers and platforms.

An ABI is not just about name mangling, but also about calling
conventions (which registers carry which arguments etc.), exception
mechanisms and a lot of other things.

Guaranteeing interoperability requires standardization of all of
these things, but some (such as calling conventions) are actually
platform-specific. However, I'd expect a standard in this area
to be platform-agnostic. Specifically, I can't see how a library
compiled with MSVC for Windows would ever link with code compiled
by gcc for Linux. The differences in name mangling are the least
of the problems here.

In short, I believe your efforts are a waste of time. The
existing approaches we have in that area work quite nicely.
If developers need more confidence in interoperability,
they should address their respective vendors first.

Jens

Received on 2023-01-27 23:43:13