This is the mail archive of the gcc-patches@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: C++ EH vs Forced Unwinding, Round 3


On Fri, May 02, 2003 at 04:00:01PM -0700, Mark Mitchell wrote:
> And I take it that it's unreasonable to compile C with setjmp/longjmp
> exceptions, with the idea of implement pthread_cleanup_push by calling
> directly into the runtime library to simulate sjlj try/catch?

(1) sjlj exceptions are not compatible with eh_frame exceptions.
    You can't mix the two.  That's one of the reasons why we 
    have the --enable-sjlj-exceptions flag.

    I have no idea how you'd go about integrating them.  Perhaps
    in the same way that one would implement longjmp_unwind, but
    I'm not keen to try because...

(2) Using the sjlj library routines is exactly as hard as
    implementing unwinding in the first place.  Without 
    compiler support for cleanups (of the non-exception kind,
    where code gets run when you exit a region) you've saved
    yourself no effort.  Indeed, you haven't even changed the
    problem.


r~


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