Re: [AD] 4.3 error handling |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
On 2006-06-09, Peter Wang <tjaden@xxxxxxxxxx> wrote:
> Here's another example: longjmps may not restore all local variables.
> This is not in my copy of the man pages any more, but it used to be
> there and presumably some compilers still have this restriction. Every
> local variable which could be referenced after a longjmp must be
> declared volatile.
Found this in the info manual:
When you perform a non-local exit, accessible objects generally
retain whatever values they had at the time `longjmp' was called. The
exception is that the values of automatic variables local to the
function containing the `setjmp' call that have been changed since the
call to `setjmp' are indeterminate, unless you have declared them
`volatile'.
Peter