]> git.eshelyaron.com Git - emacs.git/commitdiff
Pacify GCC setjmp/longjmp warning
authorPaul Eggert <eggert@cs.ucla.edu>
Sat, 6 May 2017 21:21:19 +0000 (14:21 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Sat, 6 May 2017 21:25:13 +0000 (14:25 -0700)
* src/eval.c (internal_lisp_condition_case): Do not modify local
var VAR, to pacify GCC’s setjmp/longjmp warning which in some
cases mistakenly diagnoses VAR possibly being modified between a
setjmp and a longjmp.

src/eval.c

index 0030271c533382d9fa53053aaf1cbb4ca890eff0..848955c2794c257ee6974a7c496ace633b2beb9c 100644 (file)
@@ -1277,18 +1277,19 @@ internal_lisp_condition_case (Lisp_Object var, Lisp_Object bodyform,
          if (NILP (var))
            return Fprogn (handler_body);
 
+         Lisp_Object handler_var = var;
          if (!NILP (Vinternal_interpreter_environment))
            {
              val = Fcons (Fcons (var, val),
                           Vinternal_interpreter_environment);
-             var = Qinternal_interpreter_environment;
+             handler_var = Qinternal_interpreter_environment;
            }
 
-         /* Bind VAR to VAL while evaluating HANDLER_BODY.  The
-            unbind_to just undoes VAR's binding; whoever longjumped
+         /* Bind HANDLER_VAR to VAL while evaluating HANDLER_BODY.
+            The unbind_to undoes just this binding; whoever longjumped
             to us unwound the stack to C->pdlcount before throwing.  */
          ptrdiff_t count = SPECPDL_INDEX ();
-         specbind (var, val);
+         specbind (handler_var, val);
          return unbind_to (count, Fprogn (handler_body));
        }
     }