about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--setjmp/jmpbug.c3
2 files changed, 7 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 23fba3607d..d6cedab7eb 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2014-11-26  Joseph Myers  <joseph@codesourcery.com>
+
+	* setjmp/jmpbug.c (test): Make foo volatile and cast it to
+	void.
+
 2014-11-25  Joseph Myers  <joseph@codesourcery.com>
 
 	* stdio-common/tst-printf-round.c (test_hex_in_one_mode): Make
diff --git a/setjmp/jmpbug.c b/setjmp/jmpbug.c
index 125977b2f7..8594c5a8a7 100644
--- a/setjmp/jmpbug.c
+++ b/setjmp/jmpbug.c
@@ -14,7 +14,7 @@ static void
 test (int x)
 {
   jmp_buf buf;
-  char *foo;
+  char *volatile foo;
   int arr[100];
 
   arr[77] = x;
@@ -25,6 +25,7 @@ test (int x)
     }
 
   foo = (char *) alloca (128);
+  (void) foo;
   sub5 (buf);
 }