From 0a13c725132ade2709da217cac70e3847a387c58 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sat, 6 May 2017 14:21:19 -0700 Subject: [PATCH] Pacify GCC setjmp/longjmp warning MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit * 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 | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) 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)); } } -- 2.39.2