Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 048a471e56028b17864e5ad9a570d43d40867776
Ticket: 1229765fffffffffffffffffffffffffffffffff
expr: ambiguous LONG_MIN parse
User & Date: mdejong on 2005-06-30 04:06:43
Changes

  1. icomment:
    Logged In: YES 
    user_id=90858
    
    Hello gents
    
    The bug fix was just for parsing of a literal LONG_MIN
    value. These
    two expr commands would both return 1 in earlier versions of
    Tcl.
    
    set min_long -2147483648
    
    expr {($min_long - 1) == 0x7FFFFFFF}
    
    expr {(-2147483648 - 1) == 0x7FFFFFFF}
    
    The current version was parsing the number "2147483648"
    as a 64 bit long long and then it would keep it as a wide type
    thinking that it was out of the long range.
    
    Re the other tests. These are just tests for expr functionality
    that were not already covered someplace else. I am writing
    a Tcl -> Java compiler for Jacl and these test cases were
    developed as part of the process. Since they all pass already,
    it seemed safe to check them in.
    
    
  2. login: "mdejong"
  3. mimetype: "text/plain"
  4. username: "mdejong"