From fcba9b58c677407263282a4028f55c33151d2ca5 Mon Sep 17 00:00:00 2001 From: Dirk Herrmann Date: Thu, 28 Dec 2000 16:06:56 +0000 Subject: [PATCH] * Get rid of the annoying variable-gets-clobbered-by-longjmp warning. --- HACKING | 9 ++------- libguile/ChangeLog | 7 +++++++ libguile/continuations.c | 2 +- 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/HACKING b/HACKING index 69258c4af..17f3fd7bf 100644 --- a/HACKING +++ b/HACKING @@ -130,13 +130,8 @@ make-stds.texi. - The Guile tree should compile without warnings under the following GCC switches, which are the default in the current configure script: - -O2 -Wall -Wpointer-arith -Wmissing-prototypes The only warnings -which can be tolerated are those about variables being clobbered by -longjmp/vfork in eval.c. The variables in question are critical to -the interpreter's performance; as far as I can tell, it is -difficult/annoying to avoid these warnings without slowing the system -down substantially. (If you can figure out a good fix, I'd be happy -to see it.) + + -O2 -Wall -Wpointer-arith -Wmissing-prototypes Note that the warnings generated vary from one version of GCC to the next, and from one architecture to the next (apparently). To provide diff --git a/libguile/ChangeLog b/libguile/ChangeLog index 665d820d6..1c940a079 100644 --- a/libguile/ChangeLog +++ b/libguile/ChangeLog @@ -1,3 +1,10 @@ +2000-12-28 Dirk Herrmann + + * continuations.c (scm_make_continuation): Make variable cont + volatile to let the compiler know that it won't be clobbered by + longjmp. (It wouldn't be anyway, but for some reason the compiler + is not able to see that.) + 2000-12-28 Dirk Herrmann This patch re-introduces the unused member "documentation" of diff --git a/libguile/continuations.c b/libguile/continuations.c index 12d313e50..8a160e91b 100644 --- a/libguile/continuations.c +++ b/libguile/continuations.c @@ -111,7 +111,7 @@ continuation_print (SCM obj, SCM port, scm_print_state *state) SCM scm_make_continuation (int *first) { - SCM cont; + volatile SCM cont; scm_contregs *continuation; scm_contregs *rootcont = SCM_CONTREGS (scm_rootcont); long stack_size;