This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: [RFC / musing] Scoped exception handling in Linux userspace?
- From: Tristan Gingold <gingold at adacore dot com>
- To: Andy Lutomirski <luto at amacapital dot net>
- Cc: linux-kernel at vger dot kernel dot org, gcc at gcc dot gnu dot org
- Date: Fri, 19 Jul 2013 07:43:40 +0200
- Subject: Re: [RFC / musing] Scoped exception handling in Linux userspace?
- References: <CALCETrVioVM=pdCU3WhU6qDtGQyqML=btBRZ5+aV6bASj9GkOQ at mail dot gmail dot com>
On Jul 19, 2013, at 2:26 AM, Andy Lutomirski wrote:
> Windows has a feature that I've wanted on Linux forever: stack-based
> (i.e. scoped) exception handling. The upshot is that you can do,
> roughly, this (pseudocode):
[...]
Indeed Windows and OpenVMS have such a mechanism. That's clean and
library friendly, but please read:
https://www.usenix.org/conference/wiess-2000/c-exception-handling-ia64
to understand how it hurts optimization.
(And no, raising an exception from an handler doesn't always work,
due to optimizations allowed by the gcc exception mechanism).
Regards,
Tristan.