Skip to content
Tcl Source Code History Of Ticket 3390638
Login

History Of Ticket 3390638

Artifacts Associated With Ticket 3390638

  1. Ticket change [87d0f1be3c] (rid 131763) by wkechel on 2011-08-12 16:09:03:

    1. assignee initialized to: "dgp"
    2. cmimetype initialized to: "text/plain"
    3. comment initialized 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 initialized to: "None"
    5. is_private initialized to: "0"
    6. priority initialized to: "5 Medium"
    7. resolution initialized to: "None"
    8. status initialized to: "Open"
    9. submitter initialized to: "wkechel"
    10. subsystem initialized to: "48. Number Handling"
    11. title initialized to: "Tcl failes sparc solaris 10 with native cc"
    12. type initialized to: "Bug"
  2. Ticket change [51c96e69c1] (rid 126187) by wkechel on 2011-08-12 23:09:51:

    1. title changed to:
      Tcl f8.5.9/10 fails sparc solaris 10 with native cc
      
  3. Ticket change [806a4153c9] (rid 116861) by wkechel on 2011-08-12 23:14:54:

    1. title changed to: "Tcl f8.5.10 fails sparc solaris 10 with native cc"
  4. Ticket change [e2f0c9b9db] (rid 87705) by wkechel on 2011-08-12 23:17:28:

    1. icomment:
      This code was not present in 8.5.9, sprintf was used directly. Why has this been modified and broken?
      
      
    2. login: "wkechel"
    3. mimetype: "text/plain"
    4. username: "wkechel"
  5. Ticket change [876afe17e7] (rid 131693) by dgp on 2011-09-14 02:29:35:

    1. icomment:
      
      TclFormatInt() was brought back into Tcl 8.5
      just as it is in Tcl 8.4.  The attempt to replace it
      with a sprintf() call was too costly in performance
      loss when used in Tcl applications that produce
      large tables of printed numbers.  I assume Tcl 8.4
      has the same problem on your platform?
      
      FWIW, I cannot reproduce the problem on a local
      Solaris 10 system building Tcl with "Forte Developer 7 C 5.4"
      
      Nevertheless, if the patch works around your optimizer woes,
      we might as well apply it.
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  6. Ticket change [49307455ac] (rid 100017) by dgp on 2011-09-14 03:05:22:

    1. closedate changed to: "2011-09-13T20:05:22"
    2. closer changed to: "dgp"
    3. icomment:
      
      
      allow_comments - 1
      
      Patch accepted on all release branches.
      
      
    4. login: "dgp"
    5. mimetype: "text/plain"
    6. resolution changed to: "Accepted"
    7. status changed to: "Closed"
    8. username: "dgp"