digitalmars.D - Request for Information: Exceptions interop
- Richard (Rikki) Andrew Cattermole (10/10) Apr 07 After some talking with Manu, I have a question that will feed
- Salih Dincer (9/14) Apr 07 Interoperability between D and C++ exception handling mechanisms
- Richard (Rikki) Andrew Cattermole (5/22) Apr 07 I'm not interested in throwing or catching, just what happens when one
- Salih Dincer (8/9) Apr 07 Look:
- Richard (Rikki) Andrew Cattermole (2/2) Apr 11 Asked at monthly meeting.
After some talking with Manu, I have a question that will feed into some thinking regarding exceptions. For each compiler dmd/ldc/gdc, for each target (win32, win64, linux, osx, ext.), are the unwinding tables compatible with the C++/Objective-c used ones for that target? What I need to know is: - Will the D unwind cleanup hook be called by C++? - Will the C++ unwind cleanup hook be called by D? What I mean by unwind cleanup hook is things like destructors and finally statements.
Apr 07
On Monday, 7 April 2025 at 08:47:15 UTC, Richard (Rikki) Andrew Cattermole wrote:... For each compiler dmd/ldc/gdc, for each target (win32, win64, linux, osx, ext.), are the unwinding tables compatible with the C++/Objective-c used ones for that target? ...Interoperability between D and C++ exception handling mechanisms is limited and not inherently supported. Therefore, exceptions thrown in one language may not be properly caught or handled by the other. https://forum.dlang.org/post/mailman.71.1397054005.1648.digitalmars-d puremagic.com Have you seen this very old thread? SDB 79
Apr 07
On 08/04/2025 8:36 AM, Salih Dincer wrote:On Monday, 7 April 2025 at 08:47:15 UTC, Richard (Rikki) Andrew Cattermole wrote:I'm not interested in throwing or catching, just what happens when one is thrown, is the cleanup functions get called as exceptions bubble up?... For each compiler dmd/ldc/gdc, for each target (win32, win64, linux, osx, ext.), are the unwinding tables compatible with the C++/ Objective-c used ones for that target? ...Interoperability between D and C++ exception handling mechanisms is limited and not inherently supported. Therefore, exceptions thrown in one language may not be properly caught or handled by the other.https://forum.dlang.org/post/mailman.71.1397054005.1648.digitalmars- d puremagic.com Have you seen this very old thread? SDB 79A long time ago likely, however I know work has happened since then so I'm wanting an up to date status of it.
Apr 07
On Monday, 7 April 2025 at 20:48:06 UTC, Richard (Rikki) Andrew Cattermole wrote:... I'm wanting an up to date status of it.Look: https://thephd.dev/_vendor/future_cxx/papers/C%20-%20Improved%20__attribute__%28%28cleanup%29%29%20Through%20defer.html Published Proposal, 2025-03-18 and: https://www.llvm.org/docs/ExceptionHandling.html SDB 79
Apr 07
Asked at monthly meeting. It mostly will work, however it is implementation defined.
Apr 11