diff options
| author | dgp@users.sourceforge.net <dgp> | 2011-09-13 20:02:51 (GMT) |
|---|---|---|
| committer | dgp@users.sourceforge.net <dgp> | 2011-09-13 20:02:51 (GMT) |
| commit | a898b5522b0ae64bcc1b7e69e3bc2cf016121975 (patch) | |
| tree | 72b4631d1d05baa45ed1bc0d0f7566328d1b4973 /generic/tclUtil.c | |
| parent | 30334306424f302df2da776ab3c84cb3ada5a4e0 (diff) | |
| download | tcl-a898b5522b0ae64bcc1b7e69e3bc2cf016121975.zip tcl-a898b5522b0ae64bcc1b7e69e3bc2cf016121975.tar.gz tcl-a898b5522b0ae64bcc1b7e69e3bc2cf016121975.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 19332c8..b327b99 100644 --- a/generic/tclUtil.c +++ b/generic/tclUtil.c @@ -2160,7 +2160,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. */ sprintf(buffer, "%ld", n); return strlen(buffer); } |
