Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

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

  1. assignee changed to: "dgp"
  2. cmimetype changed to: "text/plain"
  3. 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
    
    
  4. foundin changed to: "None"
  5. is_private changed to: "0"
  6. priority changed to: "5 Medium"
  7. resolution changed to: "None"
  8. status changed to: "Open"
  9. submitter changed to: "wkechel"
  10. subsystem changed to: "48. Number Handling"
  11. title changed to: "Tcl failes sparc solaris 10 with native cc"
  12. type changed to: "Bug"