Re: warning while compiling picolisp

2010-07-25 Thread Alexander Burger
Hi Edwin,

 flow.c: In function `doCatch':
 flow.c:1351: warning: argument `x' might be clobbered by `longjmp' or `vfork'

This message is familiar to me, both when we used OpenBSD at a
customer's site, and for some older versions of Linux (i.e. an older
'gcc').

I investigated it deeper at that time, and came to the conclusion that
it is not critical (at least I never observed any problems ;)

The reason must have to do how the compiler saves the environment,
including the state of local variables like 'x', and how the code
resumes when a longjmp() is executed. For me, it is a bug in the
compiler, as it is its duty to properly save and restored its stuff.

IIRC, the warning disappears when 'x' is declared as a volatile
variable, but I don't know if that has any adverse side effects then.
Still the question remains why the compiler, after it detects that the
variable might be clobbered, it doesn't take appropriate measures by
itself.

The best solution is to use a more up-to-date version of 'gcc', or -
even better - use the 64-bit version which avoids 'C' :-)

Cheers,
- Alex
-- 
UNSUBSCRIBE: mailto:picol...@software-lab.de?subject=unsubscribe


Re: warning while compiling picolisp

2010-07-25 Thread Edwin Eyan Moragas
On Mon, Jul 26, 2010 at 12:59 AM, dexen deVries dexen.devr...@gmail.com wrote:
 On Sunday 25 of July 2010 17:41:11 you wrote:
 compiling picoLisp-3.0.3 on openbsd 4.6 gives some warnings. the
 others i am familiar with but this one is beyond my C programming foo
 at the moment:

 flow.c: In function `doCatch':
 flow.c:1351: warning: argument `x' might be clobbered by `longjmp' or
 `vfork'

 Not a patch, but this is what i've found:

 http://www.technovelty.org/code/c/cdecl.html

thank you. learn something... old.. every day. :)

 --
 UNSUBSCRIBE: mailto:picol...@software-lab.de?subject=unsubscribe

-- 
UNSUBSCRIBE: mailto:picol...@software-lab.de?subject=unsubscribe