This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]