C++ Logo

sg10

Advanced search

Re: [SG10] Adding a macro to identify the ABI

From: Jonathan Wakely <cxx_at_[hidden]>
Date: Mon, 9 Jan 2017 09:28:56 +0000
On 8 January 2017 at 19:30, Saleem Abdulrasool wrote:
> std::type_info comes from the runtime. Someone needs to implement it for
> our to be provided.

Agreed so far.

> Having the compiler identify the ABI means that the runtime has a concrete
> manner to determine what ABI is being requested.

Now I'm lost. What determination does the runtime do? Is there a
runtime that can dynamically switch to providing a different ABI?
Surely that's done by linking to a different runtime, i.e. determined
"outside" the runtime, not by it.

> On certain platforms it is
> not possible to determine the ABI without having the compiler indicate to
> you which is in use.

OK, but the compiler should also be choosing the right runtime. And
that should all happen correctly without user interaction.

> Furthermore, this would allow verification that the user code and the
> runtime agree on the ABI itself.

How would a macro achieve that?

Received on 2017-01-09 10:29:18