gcl-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gcl-devel] Windows GCL: setjmp/longjmp


From: Mike Thomas
Subject: [Gcl-devel] Windows GCL: setjmp/longjmp
Date: Mon, 22 Mar 2004 12:31:57 +1000

Hi all.

Here is a question:

| The
| values of all variables (except register variables) that are accessible to
| the routine receiving control contain the values they had when longjmp was
| called. The values of register variables are unpredictable. The value
| returned by setjmp must be nonzero. If value is passed as 0, the
| value 1 is
| substituted in the actual return.
|
| Call longjmp before the function that called setjmp returns; otherwise the
| results are unpredictable.
|
| Observe the following restrictions when using longjmp:
|
| Do not assume that the values of the register variables will remain the
| same. The values of register variables in the routine calling
| setjmp may not
| be restored to the proper values after longjmp is executed.


My understanding is that any local variable is likely to be a register
variable as most compilers these days ignore programmer usage of the
register storage modifier.

Is that true?

If so, then format.c looks like a good place to start looking for trouble
with setjmp/longjmp.

Unfortunately, so far I haven't been able to come up with a format statement
which causes a problem.

Cheers

Mike Thomas.







reply via email to

[Prev in Thread] Current Thread [Next in Thread]