Negative return codes misinterpreted
Closed / Fixed647307ffffffffffffffffffffffffffffffffffCreated 24 years agoUpdated 24 years ago
Descriptionplain2002-12-02 23:02:53
Tcl 8.4 procedure bodies seem to interpret the return
code -1 as if it was 4 (continue). This obstructs
[returneval] (see http://mini.net/tcl/4346).
New bad behaviour:
% info patchlevel
8.4.1
% parray tcl_platform
tcl_platform(byteOrder) = bigEndian
tcl_platform(machine) = ppc
tcl_platform(os) = MacOS
tcl_platform(osVersion) = 9.0
tcl_platform(platform) = macintosh
% proc a {} {return -code -1 Special}
% a
command returned bad code: -1
% proc b {} {a}
% b
invoked "continue" outside of a loop
It should be "command returned bad code: -1" in both
cases. In 8.3.4 it was:
% info patchlevel
8.3.4
% proc a {} {return -code -1 Special}
% a
command returned bad code: -1
% proc b {} {a}
% b
command returned bad code: -1
This could be related to bug 633204, but they could also
be unrelated.
Lars Hellström
dgp Ticket [647307ffff]: 1 change
[History diff]2002-12-05 06:45:37
dgpplain2002-12-12 04:09:45
Logged In: YES user_id=80530 Only negative return code values seem to have this problem.
dgpplain2002-12-12 04:15:49
Logged In: YES user_id=80530 The bug is in ProcessProcResultCode() which did not consider negative return codes.
dgpplain2002-12-12 04:29:57
Logged In: YES user_id=80530 committing fix and test.
Log in (anonymous is fine) to add a comment.