From 8e66bdfc7806f99090b8b416b1d1b759db770f24 Mon Sep 17 00:00:00 2001
From: Mike Frysinger <vapier@gentoo.org>
Date: Wed, 16 Mar 2005 23:17:06 +0000
Subject: http://bugs.uclibc.org/view.php?id=165 d1mag writes: Compilation of
 _fpmaxtostr.c generate an internal error by m68k-elf-gcc, and this patch has
 been used in uClinux-dist to fix it.

---
 libc/stdio/_fpmaxtostr.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

(limited to 'libc/stdio')

diff --git a/libc/stdio/_fpmaxtostr.c b/libc/stdio/_fpmaxtostr.c
index 7fd67ffb4..239b85974 100644
--- a/libc/stdio/_fpmaxtostr.c
+++ b/libc/stdio/_fpmaxtostr.c
@@ -205,7 +205,7 @@ size_t _fpmaxtostr(FILE * fp, __fpmax_t x, struct printf_info *info,
 	__fpmax_t lower_bnd;
 	__fpmax_t upper_bnd = 1e9;
 #endif /* __UCLIBC_HAS_HEXADECIMAL_FLOATS__ */
-	uint_fast32_t digit_block;
+	volatile uint_fast32_t digit_block;
 #ifdef __UCLIBC_HAS_HEXADECIMAL_FLOATS__
 	uint_fast32_t base = 10;
 	const __fpmax_t *power_table;
@@ -221,9 +221,9 @@ size_t _fpmaxtostr(FILE * fp, __fpmax_t x, struct printf_info *info,
 	int nblk2;			   /* This does not need to be initialized. */
 	const char *ts;		   /* This does not need to be initialized. */
 #endif /* __UCLIBC_HAS_GLIBC_DIGIT_GROUPING__ */
-	int i, j;
+	volatile int i, j;
 	int round, o_exp;
-	int exp, exp_neg;
+	volatile int exp, exp_neg;
 	int width, preci;
 	int cnt;
 	char *s;
-- 
cgit v1.2.3