From: Paul Eggert Date: Sat, 6 May 2017 21:21:19 +0000 (-0700) Subject: Pacify GCC setjmp/longjmp warning X-Git-Tag: emacs-26.0.90~521^2~448 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=0a13c725132ade2709da217cac70e3847a387c58;p=emacs.git Pacify GCC setjmp/longjmp warning * 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. --- diff --git a/src/eval.c b/src/eval.c index 0030271c533..848955c2794 100644 --- a/src/eval.c +++ b/src/eval.c @@ -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)); } }