handling setjmp/longjmp in new front-end
Richard Henderson
rth@redhat.com
Fri Dec 29 00:38:00 GMT 2000
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~
More information about the Gcc
mailing list