|
2002-12-13
| ||
| 00:04 | • Ticket [648441ffff] "0x" handled as float constant status still Cl... artifact: d9d25a4c74 user: oox | |
|
2002-12-12
| ||
| 23:46 | • Ticket [648441ffff]: 7 changes artifact: 0a8faf88f3 user: dgp | |
| 03:30 | • Closed ticket [648441ffff]. artifact: 7461794a1d user: dgp | |
| 03:30 | • Ticket [648441ffff]: 5 changes artifact: d122858a77 user: dgp | |
| 01:53 | • Ticket [648441ffff]: 5 changes artifact: 80077321a2 user: dgp | |
| 00:53 | • Ticket [648441ffff]: 5 changes artifact: c46c79917d user: dgp | |
|
2002-12-05
| ||
| 16:48 | • Ticket [648441ffff]: 4 changes artifact: cb2e21acc2 user: oox | |
| 06:34 | • Ticket [648441ffff]: 7 changes artifact: b53179ffa6 user: dgp | |
|
2002-12-04
| ||
| 15:32 | • New ticket [648441ffff]. artifact: decf26c433 user: nobody | |
"0x" handled as float constant
Closed / Fixed648441ffffffffffffffffffffffffffffffffffCreated 24 years agoUpdated 24 years ago
Descriptionplain2002-12-04 15:32:58
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---
dgpplain2002-12-05 06:34:35
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.
ooxplain2002-12-05 16:48:11
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---
dgpplain2002-12-12 00:53:54
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.
dgpplain2002-12-12 01:53:38
Logged In: YES
user_id=80530
TclParseInteger("0x",2) is returning 0 instead of 1.
That appears to be the root cause. testing futher....
dgpplain2002-12-12 03:30:00
Logged In: YES user_id=80530 Yes, that's it. Committing fix and new test.
dgp Closed ticket [648441ffff].
[History diff]2002-12-12 03:30:42
dgpplain2002-12-12 23:46:10
Logged In: YES user_id=80530 For more info on the C99 issue, see Tcl Bug 523537.
ooxplain2002-12-13 00:04:13
Logged In: YES user_id=662619 Thanks for the C99 info! Juan Carlos---
Log in (anonymous is fine) to add a comment.