|
From: Bruno H. <br...@cl...> - 2011-07-05 21:52:49
|
Sam wrote:
> --- src/control.d 19 Nov 2009 21:18:36 -0000 1.171
> +++ src/control.d 2 Jul 2011 17:56:35 -0000
> @@ -1593,7 +1593,7 @@
>
> LISPSPECFORM(tagbody, 0,0,body)
> { /* (TAGBODY {tag | statement}), CLTL p. 130 */
> - var object body = popSTACK();
> + var volatile object body = popSTACK();
> { /* build GENV-frame: */
> var gcv_object_t* top_of_frame = STACK; /* pointer to frame */
> pushSTACK(aktenv.go_env);
My opinion has always been that if a compiler issues a pointless warning,
I ignore this warning, rather than making changes that slow down the program
and remove the warning.
Here the warning is pointless because the dangerous situation with setjmp()
is that when it returns a nonzero value, the register-allocated local
variables may have been clobbered (an effect typically only seen on SPARC
CPUs, but I'm glad gcc warns about it on all platforms). Here the only
setjmp() call is in the
finish_entry_frame(ITAGBODY,returner,, goto go_entry; );
line, and when setjmp() has returned a nonzero value, the statement
body = value1;
is executed.
> while I would love to see the ignorable warning disappear, I am a little
> bit wary of using this patch because it seems that this abuses
> `volatile' (its meaning is that "this variable can be modified outside
> this process" which is not the same as what the warning is about).
'volatile' instructs the compiler not to make assumptions about the variable's
value. If it removes the warning then - apparently - because it also causes
gcc to allocate the variable on the C stack rather than in a register.
So, it slows down the interpreter.
Bruno
|