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: __attribute__((cleanup(function)) versus try/finally


On Thu, May 08, 2003 at 01:19:23PM +0530, Ranjit Mathew wrote:
> The __finally block is executed in case of both "normal" C++ exceptions
> as well as "faults" such as accessing a NULL pointer, dividing by zero,
> etc.

And your point is... ?  Libjava does this for dwarf2 EH on Linux.

> Of course this would tie in with integrating SEH support into GCC,
> a brave attempt at which can be found at:
> 
>    http://reactos.wox.org/index.php?page=gccseh
> 
> in which case my point becomes moot.

Exactly.

Incidentally, I would be willing to review and incorporate pieces
of this into gcc.

I can't promise anything about "__except" or "__leave" (indeed, I
suspect that they _won't_ be incorporated), but we can at least talk
about including SEH for general exception handling.  At minimum you'd
be able to use catch(...) instead of "__except" in C++.

> Does anyone know why "fsjlj-exceptions" support was
> dropped and made a configure time option?

The runtime libraries can't handle both at once.

> SEH is an SJLJ type scheme:
> 
> http://www.microsoft.com/msj/0197/Exception/Exception.aspx

That's too bad.  Not *horrible* given that x86 only has
3 call-saved registers, but...


r~


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