Overview
| Artifact ID: | 87d0f1be3c9425af5b807cedf6bfb81afa812d33 |
|---|---|
| Ticket: | 3390638fffffffffffffffffffffffffffffffff
Tcl f8.5.10 fails sparc solaris 10 with native cc |
| User & Date: | wkechel on 2011-08-12 16:09:03 |
Changes
- assignee changed to: "dgp"
- cmimetype changed to: "text/plain"
- comment changed to:
Tcl fails when build with natice solaris studio cc under sparc solaris 10. Compiler optimzation breaks tclUtil.c:TclFormatInt. Indicator: tests fail. Simple testcase 'format %d 0x80000000' -> -s OOPS?? The following patch solves the issue: in tclUtils.c:TclFormatInt change the code after the comment /* * Check whether "n" is the maximum negative value. This is * -2^(m-1) for an m-bit word, and has no positive equivalent; * negating it produces the same value. */ old: if (n == -n) { return sprintf(buffer, "%ld", n); } NEW: intVal = -n; if (n == -n || intVal == n) { return sprintf(buffer, "%ld", n); } My Configuration (no gcc in path!): ssol10% echo $path /usr2/gnu/bin /usr2/scripts /usr/bin /sbin /usr/sbin /usr/ccs/bin /usr/bin/X11 /usr/bin /usr/openwin/bin /usr/dt/bin ssol10% ../unix/configure --prefix=/usr2/gnu - foundin changed to: "None"
- is_private changed to: "0"
- priority changed to: "5 Medium"
- resolution changed to: "None"
- status changed to: "Open"
- submitter changed to: "wkechel"
- subsystem changed to: "48. Number Handling"
- title changed to: "Tcl failes sparc solaris 10 with native cc"
- type changed to: "Bug"