[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master 0a13c72 1/2: Pacify GCC setjmp/longjmp warning
From: |
Paul Eggert |
Subject: |
[Emacs-diffs] master 0a13c72 1/2: Pacify GCC setjmp/longjmp warning |
Date: |
Sat, 6 May 2017 17:25:18 -0400 (EDT) |
branch: master
commit 0a13c725132ade2709da217cac70e3847a387c58
Author: Paul Eggert <address@hidden>
Commit: Paul Eggert <address@hidden>
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.
---
src/eval.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/src/eval.c b/src/eval.c
index 0030271..848955c 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));
}
}