From ab61513f03e3775e54e47b51f826e0061ad3c7b9 Mon Sep 17 00:00:00 2001 From: Glenn Strauss Date: Sat, 17 Sep 2016 20:09:01 -0400 Subject: [PATCH] arith: use volatile to attempt to thwart optimizer github: fixes #7, fixes #10, fixes #21 --- UnixBench/src/arith.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/UnixBench/src/arith.c b/UnixBench/src/arith.c index bbacb08..05fab70 100644 --- a/UnixBench/src/arith.c +++ b/UnixBench/src/arith.c @@ -35,7 +35,7 @@ char SCCSid[] = "@(#) @(#)arith.c:3.3 -- 5/15/91 19:30:19"; int dumb_stuff(int); -unsigned long iter; +volatile unsigned long iter; /* this function is called when the alarm expires */ void report()