From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3428 invoked by alias); 3 May 2004 11:18:05 -0000 Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org Received: (qmail 3409 invoked from network); 3 May 2004 11:18:04 -0000 Received: from unknown (HELO diogenis.ceid.upatras.gr) (150.140.141.181) by sources.redhat.com with SMTP; 3 May 2004 11:18:04 -0000 Received: (qmail 25993 invoked from network); 3 May 2004 11:17:58 -0000 Received: from zenon.ceid.upatras.gr (150.140.141.182) by diogenis.ceid.upatras.gr with SMTP; 3 May 2004 11:17:58 -0000 Received: (qmail 19606 invoked by uid 2228); 3 May 2004 11:17:57 -0000 Date: Mon, 03 May 2004 11:18:00 -0000 From: Stelios Xanthakis To: david daney cc: Richard Henderson , gcc@gcc.gnu.org Subject: RE: Using EH from C In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-SW-Source: 2004-05/txt/msg00053.txt.bz2 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