summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2011-09-13 20:03:34 (GMT)
committerdgp <dgp@users.sourceforge.net>2011-09-13 20:03:34 (GMT)
commit3d2e1cceb46e104ca8ecdac157dd4c083a207f8c (patch)
tree8ce021e431f45aeac3d1d0860a7f30d7d819445b
parentcb64602c984b5e2475fbbefc24d9d05c23e786f0 (diff)
parenteba0aa0b63589c49ebad74cf7f784cc39afb5ef1 (diff)
downloadtcl-3d2e1cceb46e104ca8ecdac157dd4c083a207f8c.zip
tcl-3d2e1cceb46e104ca8ecdac157dd4c083a207f8c.tar.gz
tcl-3d2e1cceb46e104ca8ecdac157dd4c083a207f8c.tar.bz2
3390638 Workaround broken solaris studio cc optimizer.
Thanks to Wolfgang S. Kechel.
-rw-r--r--ChangeLog3
-rw-r--r--generic/tclUtil.c3
2 files changed, 5 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index f885c08..257545c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
2011-09-13 Don Porter <dgp@users.sourceforge.net>
+ * generic/tclUtil.c: [Bug 3390638] Workaround broken solaris
+ studio cc optimizer. Thanks to Wolfgang S. Kechel.
+
* generic/tclDTrace.d: [Bug 3405652] Portability workaround for
broken system DTrace support. Thanks to Dagobert Michelson.
diff --git a/generic/tclUtil.c b/generic/tclUtil.c
index eaa7eae..5119456 100644
--- a/generic/tclUtil.c
+++ b/generic/tclUtil.c
@@ -3165,7 +3165,8 @@ TclFormatInt(buffer, n)
* negating it produces the same value.
*/
- if (n == -n) {
+ intVal = -n; /* [Bug 3390638] Workaround for*/
+ if (n == -n || intVal == n) { /* broken compiler optimizers. */
return sprintf(buffer, "%ld", n);
}