From c6193d0b53474d4af00621c9d4b5777a745b8d6b Mon Sep 17 00:00:00 2001 From: sam Date: Thu, 2 Mar 2006 21:17:23 +0000 Subject: [PATCH] * src/cont.c: marked as volatile variables that we don't want optimised away. git-svn-id: svn://svn.zoy.org/elk/trunk@262 55e467fa-43c5-0310-a8a2-de718669efc6 --- src/cont.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/cont.c b/src/cont.c index 9a30775..6f3f1e9 100644 --- a/src/cont.c +++ b/src/cont.c @@ -113,14 +113,14 @@ int Check_Stack_Grows_Down () { * (the stack grows upwards on HP-PA based machines and Pyramids). */ unsigned int Stack_Size () { - char foo; - char *pfoo; + volatile char foo; + char *pfoo = &foo; return Stack_Grows_Down ? stkbase-pfoo : pfoo-stkbase; } void Grow_Stack (struct S_Control *cp, Object val) { - char buf[100]; + volatile char buf[100]; /* Prevent the optimizer from optimizing buf away: */ @@ -133,7 +133,7 @@ void Jump_Cont (struct S_Control *cp, Object val) { static struct S_Control *p; static char *from, *to; /* Must not be allocated on stack */ static int i; /* Ditto */ - char foo; + volatile char foo; /* Reinstall the saved stack contents; take stack direction * into account. cp must be put into a static variable, as