From: <no...@so...> - 2001-10-24 03:45:19
|
Bugs item #474335, was opened at 2001-10-23 20:45 You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=110894&aid=474335&group_id=10894 Category: 48. Portability Support Group: 8.4a4 Status: Open Resolution: None Priority: 5 Submitted By: Don Porter (dgp) Assigned to: Mo DeJong (mdejong) Summary: logic of matherr is backwards Initial Comment: 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 ?) ---------------------------------------------------------------------- You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=110894&aid=474335&group_id=10894 |