From eba0aa0b63589c49ebad74cf7f784cc39afb5ef1 Mon Sep 17 00:00:00 2001 From: dgp Date: Tue, 13 Sep 2011 20:02:51 +0000 Subject: 3390638 Workaround broken solaris studio cc optimizer. Thanks to Wolfgang S. Kechel. --- ChangeLog | 3 +++ generic/tclUtil.c | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 6fadd37..6911e2b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2011-09-13 Don Porter + * 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 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); } -- cgit v0.12