On Wednesday, 9 April 2014 at 17:27:56 UTC, David Nadlinger wrote:
On Wednesday, 9 April 2014 at 16:48:54 UTC, Jacob Carlborg
wrote:
x86_64 yes, not necessarily only for DMD. I thought if DMD,
LDC and GDC all used the same exception handling model and the
same as C++ it would be easier. Especially for implementing
support for Objective-C exceptions, which is why initially
started this thread.
They don't. GDC and LDC use libunwind, whereas DMD uses its own
custom EH implementation.
With GDC and LDC, you'd just need to add your code to handle
Objective-C exceptions to the personality functions. libunwind
exceptions have a "type"/"source language" field, and by
default most implementations either ignore unknown exception
types or abort on encountering them.
David
The C++ personality function from GCC does not catch, but do the
cleanup on foreign exceptions. That sound like the right behavior
to me.