From: SourceForge.net <no...@so...> - 2005-08-04 11:53:35
|
Bugs item #1251791, was opened at 2005-08-04 08:45 Message generated for change (Comment added) made by msofer You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=110894&aid=1251791&group_id=10894 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: 44. Parsing and Eval Group: current: 8.4.11 Status: Open Resolution: None Priority: 5 Submitted By: miguel sofer (msofer) Assigned to: miguel sofer (msofer) Summary: optimisation reveals integer/wide problems Initial Comment: The optimisation that preserves a Tcl_Obj when appending an empty string only happens for bytecoded scripts. Combined with integer/wide difficulties, this produces inconsistent results when the same script is bcc'ed or not. mig@ave:/home/CVS/tcl-core-8-4-branch/unix$ cat > /tmp/test proc test {} { set res [info patchlevel] set a [expr {wide(65536)}] lappend res [expr {$a*$a}] set b $a[set a ""] lappend res [expr {$b*$b}] } puts [test] set res [info patchlevel] set a [expr {wide(65536)}] lappend res [expr {$a*$a}] set b $a[set a ""] puts [lappend res [expr {$b*$b}]] mig@ave:/home/CVS/tcl-core-8-4-branch/unix$ ./tclsh /tmp/test 8.4.11 4294967296 4294967296 8.4.11 4294967296 0 ---------------------------------------------------------------------- >Comment By: miguel sofer (msofer) Date: 2005-08-04 08:53 Message: Logged In: YES user_id=148712 Note that the bug is present since 8.4.8 and in HEAD too. Previous releases produce a consistent output: 8.4.7 4294967296 0 8.4.7 4294967296 0 ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=110894&aid=1251791&group_id=10894 |