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)
commitc6e44af1862f2818ef3586bf70986d7f75c5ae77 (patch)
tree8ce021e431f45aeac3d1d0860a7f30d7d819445b
parentb859929a2a06d844e2dbd36a7a897ef892285820 (diff)
parent6b9fd91cb423efbab3b7cab0c94f43b7da713024 (diff)
downloadtcl-c6e44af1862f2818ef3586bf70986d7f75c5ae77.zip
tcl-c6e44af1862f2818ef3586bf70986d7f75c5ae77.tar.gz
tcl-c6e44af1862f2818ef3586bf70986d7f75c5ae77.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);
}