summaryrefslogtreecommitdiffstats
path: root/generic/tclStrToD.c
diff options
context:
space:
mode:
author200002852 <200002852@noemail.net>2011-04-02 22:07:58 (GMT)
committer200002852 <200002852@noemail.net>2011-04-02 22:07:58 (GMT)
commit4b09812b926bfe3c28867ab15e270b09ddbbed01 (patch)
tree820438bd680192a6a6a2c1541c0886cf362234ff /generic/tclStrToD.c
parent322887dfaa772d7164d89239152950ce6cf47cf1 (diff)
parent4459810d1c5296833cc0cf0f8bf0c00a71a49815 (diff)
downloadtcl-4b09812b926bfe3c28867ab15e270b09ddbbed01.zip
tcl-4b09812b926bfe3c28867ab15e270b09ddbbed01.tar.gz
tcl-4b09812b926bfe3c28867ab15e270b09ddbbed01.tar.bz2
Replaced another couple of 'double' declarations with 'volatile
double' to work around misrounding issues in mingw-gcc 3.4.5. FossilOrigin-Name: 147186904ca5314ad03bdfe3b12fd4487d5641c5
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 d4a3b4b..205b865 100755
--- a/generic/tclStrToD.c
+++ b/generic/tclStrToD.c
@@ -2710,7 +2710,7 @@ StrictQuickFormat(
inline static char *
QuickConversion(
- double d, /* Number to format. */
+ 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:
@@ -2729,12 +2729,14 @@ QuickConversion(
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 by one. If