__builtin_longjmp and rs6000 TOC

Richard Henderson rth@cygnus.com
Thu Jan 29 19:20:00 GMT 1998


On Thu, Jan 29, 1998 at 09:34:52PM -0500, David Edelsohn wrote:
> 	I thought that nonlocal_goto was itself used for
> __builtin_longjmp.

Was.  Is to some extent.  I was trying to make the point that
nonlocal_goto should be considered a special case of longjmp,
and so it ought to be able to ignore some particular problems.

> Also, while I agree that nonlocal_goto is meant for
> nested functions, nothing prevents the nesting from crossing module
> boundaries

Eh?  Nested functions across module boundaries?

        extern void bar (void (*)(void));
        void foo() {
          __label__ out;
          int count = 0;
          void baz() { if (++count == 10) goto out; }

          bar(baz);
        out:;
        }

How do you get foo and baz in different modules?

> unless nonlocal_goto is defined only to be
> valid for intra-module nested jumps, I do not see how one can avoid the
> worst case intermodule case.

I am suggesting that we do just that -- make nonlocal_goto be
defined only for intra-module jumps, and that longjmp be used
for inter-module jumps.


r~



More information about the Gcc mailing list