This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
RE: Using EH from C
- From: Stelios Xanthakis <sxanth at ceid dot upatras dot gr>
- To: david daney <ddaney at avtrex dot com>
- Cc: Richard Henderson <rth at redhat dot com>, gcc at gcc dot gnu dot org
- Date: Mon, 3 May 2004 14:17:56 +0300 (EET DST)
- Subject: RE: Using EH from C
On Sun, 2 May 2004, Stelios Xanthakis wrote:
> On Sat, 1 May 2004, david daney wrote:
>
> >
> > I would setjump and set an attfibute(cleanup(function))
> > at the catch point, and then longjump from the cleanup function.
> >
[snip]
> And pdtor() will either just return or longjmp to ctx depending
> on normal_termination.
>
Although the manual sais:
`` Note that the `cleanup' attribute does not allow
the exception to be caught, only to perform an action. It is
undefined what happens if CLEANUP_FUNCTION does not return
normally. ''
Seems like somebody already thought that somebody else might
think of using 'cleanup' to catch exceptions :)
For the moment it works and I hope we can resolve this in the
next version. If the only problem is the un-freed struct
_Unwind_Exception, we can take care of it.
stelios