Hi Hiroyasu, On Tue, Aug 10, 2010 at 1:37 PM, Kamo Hiroyasu <[email protected]> wrote: > Hello, > > From: Edwin Eyan Moragas <[email protected]> > Subject: clobbered by `longjmp' warning > Date: Tue, 10 Aug 2010 08:20:49 +0800 >> i have this warning when i compile picolisp in obsd 4.7: >> >> flow.c: In function `doCatch': >> flow.c:1351: warning: argument `x' might be clobbered by `longjmp' or `vfork' > > The patch > > - any doCatch(any x) { > + any doCatch(volatile any x) { > any y; > catchFrame f; > > > may works.
thank you. i guess it is for me to find out if it is indeed ok for the variable to be changed between setjmp()s. :) > > setjmp() saves some of the registers which longjmp() will recover. If > some variable assigned to a register changes its value after a call of > setjump(), its value may be recovered by a call of longjmp(). To > prevent such an unexpected recovery, you should tell the compiler that > the value of the variable may be modified between the call of > setjump() and the call of the jongjmp() by using the keyword > `volatile'. > > Kamo Hiroyasu [Kamo is the family name and Hiroyasu the given name.]

