Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: f4a99c1150ebc2b83ec1d99172a8cb137866100f
Ticket: 991371ffffffffffffffffffffffffffffffffff
format problem with wide ints
User & Date: hobbs on 2004-07-16 11:31:53
Changes

  1. icomment:
    Logged In: YES 
    user_id=72656
    
    I found that this:
    
    -    if (wideValue>ULONG_MAX || wideValue<LONG_MIN) {
    +    if (wideValue>LONG_MAX || wideValue<LONG_MIN) {
    
    at line 2209 of tclCmdAH.c:Tcl_FormatObjCmd made it work on
    Solaris-64, which indicates a sign extension bug in the
    compiler.
    Note that the above fix isn't actually correct code for this
    case (although I wonder whether we should be mingling
    unsigned checks for %d as well as the %[uoxX] this case covers).
    
    Also, a shorter test case is:
    
    et x [expr {wide(1)}]
    set code [catch {format "%d bytes" $x} res]
    puts "1st format ($code): $res"
    set code [catch {format "%d bytes" $x} res]
    puts "2nd format ($code): $res"
    
    
    
  2. login: "hobbs"
  3. mimetype: "text/plain"
  4. username: "hobbs"