diff options
author | dgp <dgp@users.sourceforge.net> | 2011-09-13 20:04:35 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2011-09-13 20:04:35 (GMT) |
commit | da0b87b68ac41cf27cf21d098a19599b8e7059cd (patch) | |
tree | afbeeb31876869c39e3570244b2d67451a7d2f84 /generic/tclUtil.c | |
parent | 92cd00fe3405fbbe03736b2791bc056d66b6306d (diff) | |
parent | c6e44af1862f2818ef3586bf70986d7f75c5ae77 (diff) | |
download | tcl-da0b87b68ac41cf27cf21d098a19599b8e7059cd.zip tcl-da0b87b68ac41cf27cf21d098a19599b8e7059cd.tar.gz tcl-da0b87b68ac41cf27cf21d098a19599b8e7059cd.tar.bz2 |
3390638 Workaround broken solaris studio cc optimizer.
Thanks to Wolfgang S. Kechel.
Diffstat (limited to 'generic/tclUtil.c')
-rw-r--r-- | generic/tclUtil.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/generic/tclUtil.c b/generic/tclUtil.c index 51508d2..31c9fd3 100644 --- a/generic/tclUtil.c +++ b/generic/tclUtil.c @@ -3156,7 +3156,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); } |