summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin B Kenny <kennykb@acm.org>2011-04-02 22:07:58 (GMT)
committerKevin B Kenny <kennykb@acm.org>2011-04-02 22:07:58 (GMT)
commitfcf7bbf6ec9bc4d484960cf51acdab44bca2683a (patch)
tree820438bd680192a6a6a2c1541c0886cf362234ff
parentd2275aefb3bc8e96e7ae22e4609ba2c7604f86fe (diff)
parent2db0d44d63bad5e5d32e84a38b8a4756d7dab1d0 (diff)
downloadtcl-fcf7bbf6ec9bc4d484960cf51acdab44bca2683a.zip
tcl-fcf7bbf6ec9bc4d484960cf51acdab44bca2683a.tar.gz
tcl-fcf7bbf6ec9bc4d484960cf51acdab44bca2683a.tar.bz2
Replaced another couple of 'double' declarations with 'volatile
double' to work around misrounding issues in mingw-gcc 3.4.5.
-rw-r--r--ChangeLog6
-rwxr-xr-xgeneric/tclStrToD.c6
-rwxr-xr-xunix/ldAix2
3 files changed, 11 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 3179b6e..23b3f1e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2011-04-02 Kevin B. Kenny <kennykb@acm.org>
+
+ * generic/tclStrToD.c (QuickConversion): Replaced another couple
+ of 'double' declarations with 'volatile double' to work around
+ misrounding issues in mingw-gcc 3.4.5.
+
2011-04-02 Donal K. Fellows <dkf@users.sf.net>
* generic/tclInterp.c, generic/tclListObj.c, generic/tclLoad.c:
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
diff --git a/unix/ldAix b/unix/ldAix
index cf37d40..51b2995 100755
--- a/unix/ldAix
+++ b/unix/ldAix
@@ -1,5 +1,5 @@
#!/bin/sh
-#
+#
# ldAix ldCmd ldArg ldArg ...
#
# This shell script provides a wrapper for ld under AIX in order to