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]

Re: handling setjmp/longjmp in new front-end


On Fri, Dec 29, 2000 at 06:27:00PM +1100, Fergus Henderson wrote:
> The existing Mercury compiler generates C code that uses
> setjmp() and longjmp().

For what do you use setjmp/longjmp?  Perhaps you really want
to be using gcc's exception handling mechanisms?

> What exactly are the restrictions?  Is it just that __builtin_longjmp()
> must always be called with the second argument being `1', or is there
> more to it?

The only extra restriction that I am aware of is that you cannot
__builtin_longjmp to a jmpbuf within the current function.

> Are __builtin_setjmp() and __builtin_longjmp() supported on all targets?

Yes.


r~

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