This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: EH in C (was: Re: (lack of) Thread-safe exceptions on AIX (gcc-2.95.1)
- To: Zack Weinberg <zack at wolery dot cumb dot org>
- Subject: Re: EH in C (was: Re: (lack of) Thread-safe exceptions on AIX (gcc-2.95.1)
- From: Bill Tutt <rassilon at list dot org>
- Date: Tue, 1 Feb 2000 14:13:41 -0800 (PST)
- cc: Bill Tutt <rassilon at list dot org>, Richard Henderson <rth at cygnus dot com>, llewelly at 198 dot dsl dot xmission dot com, gcc at gcc dot gnu dot org
On Tue, 1 Feb 2000, Zack Weinberg wrote:
[__try/__catch]
> invents fewer new concepts than adding a __finally. Also note that
> pthread_cleanup_pop() does not always execute the cleanup function you
> registered earlier.
>
While its true that it invents fewer concepts, I'm not exactly sure why
you think thats a useful metric to use when it causes the sideeffect of
having to write the cleanup code twice.
> Another thing to think about - it'd be Nice if setjmp/longjmp
> interoperated with throw/catch, partially because that would make the
> behavior politer to C++ code, partially because the compiler would
> comprehend control flow better. (On second thought, there may be code
> out there that expects that longjmp() will go directly to its target,
> not visiting catch handlers and not collecting $200.)
>
Just as more of an FYI, MS stuck versions of setjmp/longjmp in setjmpex.h
or something similar that does use the stack unwinding information.
Bill