Catching C++ std::exception in D

David Nadlinger via Digitalmars-d digitalmars-d at puremagic.com
Thu Nov 12 13:11:54 PST 2015


On Thursday, 12 November 2015 at 16:55:09 UTC, Johannes Pfau 
wrote:
> To expand on this: I think we'd prefer one __d_personality_v0 
> which is implemented in upstream druntime and identical for all 
> compilers.
>
> Making the compilers ABI compatible is probably not a high 
> priority, but OTOH we shouldn't introduce new ABI 
> incompatibilities if possible.

It should probably be based on the LDC implementation then, as it 
supports the most target platforms (Posix/libunwind, Win64/MSVC, 
iOS/SJLJ, and, as work in progress, Win32/SEH) and GDC's 
implementation is probably GPL-licensed (with runtime exceptions, 
but still definitely not Boost-compatible).

> Think of it this way: At some point it would be nice to have 
> one, system-wide installed druntime shared library (from any 
> compiler) and programs compiled with any other compiler should 
> be able to use it. We've got well-defined name mangling 
> primarily to allow this - but because of many small differences 
> mixing compilers is not possible yet.

The biggest of which is probably that GDC and DMD disagree on 
parameter passing orders.

  — David


More information about the Digitalmars-d mailing list