summaryrefslogtreecommitdiffstats
path: root/generic/tclStrToD.c
diff options
context:
space:
mode:
authorKevin B Kenny <kennykb@acm.org>2011-04-02 21:55:39 (GMT)
committerKevin B Kenny <kennykb@acm.org>2011-04-02 21:55:39 (GMT)
commita52adf6f4da63486cacc0d10c10d297ab6d449ff (patch)
treeb4ee999406012302c358cbcb5598dc0fa414aad2 /generic/tclStrToD.c
parent1c847fd20258b21754d3ef36e89352281e708cee (diff)
downloadtcl-a52adf6f4da63486cacc0d10c10d297ab6d449ff.zip
tcl-a52adf6f4da63486cacc0d10c10d297ab6d449ff.tar.gz
tcl-a52adf6f4da63486cacc0d10c10d297ab6d449ff.tar.bz2
Replaced another couple of 'double' declarations with 'volatile
double' to work around misrounding issues in mingw-gcc 3.4.5.
Diffstat (limited to 'generic/tclStrToD.c')
-rwxr-xr-xgeneric/tclStrToD.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/generic/tclStrToD.c b/generic/tclStrToD.c
index d5c6e9c..139b8f2 100755
--- a/generic/tclStrToD.c
+++ b/generic/tclStrToD.c
@@ -2668,7 +2668,7 @@ StrictQuickFormat(double d, /* Number to convert */
*/
inline static char*
-QuickConversion(double d, /* Number to format */
+QuickConversion(double e, /* Number to format */
int k, /* floor(log10(d)), approximately */
int k_check, /* 0 if k is exact, 1 if it may be too high */
int flags, /* Flags passed to dtoa:
@@ -2686,11 +2686,13 @@ QuickConversion(double d, /* Number to format */
char* retval; /* Returned string */
char* end; /* Pointer to the terminal null byte in the
* returned string */
+ volatile double d; /* Workaround for a bug in mingw gcc 3.4.5 */
/*
* Bring d into the range [1 .. 10)
*/
- ieps = AdjustRange(&d, k);
+ ieps = AdjustRange(&e, k);
+ d = e;
/*
* If the guessed value of k didn't get d into range, adjust it