From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jason Merrill To: tom@zaphod.wh9.tu-dresden.de (Thomas Weise), egcs@cygnus.com Subject: Re: EH unwind bug Date: Wed, 26 Nov 1997 06:10:00 -0000 Message-id: References: <347B307E.80D08A44.cygnus.egcs@zaphod.wh9.tu-dresden.de> X-SW-Source: 1997-11/msg00870.html >>>>> Thomas Weise writes: > This is, the local object's destructor is executed twice, before the > exception raiser's destructor and again after raising the exception. This will be hard to fix. The problem is that the return statement is represented as a jump to the end of the function. Jumps out of a scope run any necessary cleanups; in this case, the destructors for obj and rais. These cleanups are expanded at the point of the jump, which is inside the EH regions for those same cleanups. Fixing this will involve reworking fixup_gotos. > Using -fsjlj-exceptions is fine. I hope this testcase comes in time and > can be fixed before release. -fsjlj-exceptions works for this testcase because it doesn't use EH regions for those cleanups. Jason