Overview
| Artifact ID: | a6b65768b13daead5b6796a48a2d93c42cc219e7 |
|---|---|
| Ticket: | 474335ffffffffffffffffffffffffffffffffff
logic of matherr is backwards |
| User & Date: | dgp on 2001-10-24 03:45:18 |
Changes
- assignee changed to: "mdejong"
- cmimetype changed to: "text/plain"
- comment changed to:
A simple look at the cvs history of unix/tclMtherr.c shows the introduction of a bug: cvs diff -r core-8-0-5 -r core-8-1-0 tclMtherr.c ... matherr(xPtr) struct exception *xPtr; /* Describes error that occurred. */ { - if (!tcl_MathInProgress) { + if (TclMathInProgress()) { return 0; ... The "!" did not survive the transition from access of a global variable to call of an internal function. The logic of matherr() became reversed. The obvious fix is to restore the proper logic. It's worth pausing though and asking why this bug hasn't been noticed in the 3 years since it was introduced. I am unable to come up with any script on any platform that exposes this error. It seems that Tcl behaves the same whether the logic is forwards or backwards. It would seem then that Tcl would also behave the same if the logic were completely removed. I welcome second opinions on this, but my inclination would be to remove the matherr() routine altogether unless someone can demonstrate it's serving a useful purpose somewhere. (And how useful can it be if it's been wrong since Tcl 8.1.0 ?) - foundin changed to: "obsolete: 8.4a4"
- priority changed to: "5 Medium"
- resolution changed to: "None"
- status changed to: "Open"
- submitter changed to: "dgp"
- subsystem changed to: "52. Portability Support"
- title changed to: "logic of matherr is backwards"
- type changed to: "Bug"