Date: Fri, 27 Jan 2023 21:43:01 -0330
On Fri, Jan 27, 2023 at 8:13 PM Jens Maurer <jens.maurer_at_[hidden]> wrote:
>
>
> 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
>
The word ABI was kind of misleading, but I just meant specifying
the things that normally get in the way of compatibility, which are
name mangling and calling member functions. The whole proposal
will be in the form of "this in C++ will be equal to this in C". It won't
specify things like registers.
>
>
> 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
>
The word ABI was kind of misleading, but I just meant specifying
the things that normally get in the way of compatibility, which are
name mangling and calling member functions. The whole proposal
will be in the form of "this in C++ will be equal to this in C". It won't
specify things like registers.
Received on 2023-01-28 01:13:14