C++ Logo

std-proposals

Advanced search

Re: [std-proposals] ABI

From: zxuiji <gb2985_at_[hidden]>
Date: Sat, 13 Jul 2024 21:32:49 +0100
I just realised, I didn't address it when someone earlier said they didn't
understand what I meant by "root calls". What I meant is that inlines like
int foo() { return bar(); } will compile to just calling bar() directly.
Same with class inheritance. The compiler should be smart enough to realise
that parent::function is not overridden in the child::function and
therefore should just call parent::function directly. If a vtable is
involved then it will just point the child::function to parent::function
and not allocate any extra space to implement child::function the same way
as parent::function. If the compiler isn't that smart then wtf you doing
using that compiler???

On Sat, 13 Jul 2024 at 18:48, Hans <hguijtra_at_[hidden]> wrote:

> On 13/07/2024 19:51, zxuiji wrote:
> > But the other classes ARE stable, just not necessarily in ABI.
> > Their behaviour is stable, that's the promise given by the API.
> > It's the ABI they don't promise and std::stable does not imply
> > to me (and likely many others) that it's addressing ABI issue.
> > That's why I suggested stdabi:: since that implicitly implies that
> > std:: has ABI issues that can catch devs unawares at times.
>
> Good point, I see what you mean. I'm not hung up on names, if there is a
> better choice I'll gladly accept it.
>
>
> Hans Guijt
>
>
>

Received on 2024-07-13 20:25:45