Artifacts Associated With Ticket 648441ffffffffff
Ticket change [decf26c433] (rid 114913) by nobody on 2002-12-04 15:32:58:
- assignee initialized to: "hobbs"
- cmimetype initialized to: "text/plain"
- comment initialized to:
Version 8.4.1 of Tcl, at least on linux, regards the string "0x" as a floating point constant: %string is double 0x 1 % set tcl_patchLevel 8.4.1 In windows the behaviour is different: %string is double 0x 0 % set tcl_patchLevel 8.4.0 Notice I've checked it with different versions of Tcl in the two platforms, although I believe 8.4.1 in windows behaves correctly. Juan Carlos---
- foundin initialized to: "obsolete: 8.4.1"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "nobody"
- subsystem initialized to: "11. Conversions from String"
- title initialized to: ""0x" handled as float constant"
- type initialized to: "Bug"
Ticket change [b53179ffa6] (rid 125199) by dgp on 2002-12-05 06:34:35:
- assignee changed to: "dgp"
- icomment:
Logged In: YES user_id=80530 In the original report on CLT, Juan Carlos reported a difference between Tcl 8.3 and Tcl 8.4 on: expr 0x That is a different issue than the one in the submitted report. This report just reflects the difference in the strtod() implementations of two different C libraries. glibc on Linux is C99 compiant, and the C library on Windows apparently is not. For the [expr 0x] incompatibility, I suspect a new parser bug.
- login: "dgp"
- mimetype: "text/plain"
- subsystem changed to: "45. Parsing and Eval"
- title changed to: ""0x" handled as float constant"
- username: "dgp"
Ticket change [cb2e21acc2] (rid 95478) by oox on 2002-12-05 16:48:11:
- icomment:
Logged In: YES user_id=662619 You surely know (much) better than me, but I guess both problems are either a single one or at least deeple related. I've been running [expr 0x] as part of the automated regression testing of a package I maintain from the last four years or so, both in windows and linux, throughout Tcl versions from 8.0, and "0x" has never been handled as float until 8.4.0 in linux. So there's never been any version between platforms not Tcl versions. Now both differences arise, and at the same time. You said "0x" being a fallback floating point constant is genuine C99 behaviour. You also say glibc on Linux is C99 compliant. From how long ago? The strtod(3) man page of the various linux systems I have handy say: "A hexadecimal number consists of a ``0x'' or ``0X'' followed by a nonempty sequence of hexadecimal digits possibly 2...". Notice the nonempty. Juan Carlos---
- login: "oox"
- mimetype: "text/plain"
- username: "oox"
- icomment:
Ticket change [c46c79917d] (rid 111846) by dgp on 2002-12-12 00:53:54:
- icomment:
Logged In: YES user_id=80530 My point is that on my Linux box I see: % info patch 8.2.3 % string is double 0x 1 So this report mentions a platform difference, not a Tcl version difference. OTOH, the behavior of [expr 0x] did change between 8.3 and 8.4. They are different problems.
- login: "dgp"
- mimetype: "text/plain"
- title changed to: ""0x" handled as float constant"
- username: "dgp"
- icomment:
Ticket change [80077321a2] (rid 97663) by dgp on 2002-12-12 01:53:38:
- icomment:
Logged In: YES user_id=80530 TclParseInteger("0x",2) is returning 0 instead of 1. That appears to be the root cause. testing futher.... - login: "dgp"
- mimetype: "text/plain"
- title changed to: ""0x" handled as float constant"
- username: "dgp"
- icomment:
Ticket change [d122858a77] (rid 113299) by dgp on 2002-12-12 03:30:00:
- icomment:
Logged In: YES user_id=80530 Yes, that's it. Committing fix and new test.
- login: "dgp"
- mimetype: "text/plain"
- title changed to: ""0x" handled as float constant"
- username: "dgp"
- icomment:
Ticket change [7461794a1d] (rid 105196) by dgp on 2002-12-12 03:30:42:
- closedate changed to: "2002-12-11T20:30:42"
- closer changed to: "dgp"
- resolution changed to: "Fixed"
- status changed to: "Closed"
- title changed to: ""0x" handled as float constant"
Ticket change [0a8faf88f3] (rid 113843) by dgp on 2002-12-12 23:46:10:
- closedate changed to: "2002-12-12T16:46:10"
- closer changed to: "dgp"
- icomment:
Logged In: YES user_id=80530 For more info on the C99 issue, see Tcl Bug 523537.
- login: "dgp"
- mimetype: "text/plain"
- title changed to: ""0x" handled as float constant"
- username: "dgp"
Ticket change [d9d25a4c74] (rid 107674) by oox on 2002-12-13 00:04:13:
- icomment:
Logged In: YES user_id=662619 Thanks for the C99 info! Juan Carlos---
- login: "oox"
- mimetype: "text/plain"
- username: "oox"
- icomment: