Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: fa6d8610ab9324d548128de864aac3d2ac8cd248
Ticket: 555635ffffffffffffffffffffffffffffffffff
Dead code: matherr, TclMathInProgress
User & Date: jenglish on 2002-05-13 21:59:18
Changes

  1. assignee changed to: "nobody"
  2. cmimetype changed to: "text/plain"
  3. comment changed to:
    The attached patch removes matherr() under Unix, the
    internal routine TclMathInProgress(), and the
    associated ThreadSpecificData.  The source file
    unix/tclMtherr.c should also be removed if this patch
    is applied.
    
    The _matherr() implementation in win/tclWinMtherr.c --
    which is only used in Borland C++, not MSVC -- has been
    retained, but it no longer checks TclMathInProgress(). 
    This routine is used to prevent the Borland C++ math
    library from raising a fatal exception when illegal
    values are encountered.  With this patch, it prevents
    exceptions from being thrown when any part of the
    program calls a math library function, not just Tcl
    internals.  Again, this is only applicable when Tcl is
    built with the Borland compiler.
    
    Further discussion may be found under SF Tcl Bug
    #474335 "logic of matherr is backwards", but in
    summary:
    
     * matherr() is nonportable and not available on all
    platforms;
     * On the platforms where it is available, it is
    typically only used if the main executable is linked
    with a special version of libm, which Tcl does not do;
     * The version in unix/tclMtherr.c is merely an
    incomplete reimplementation of the default behaviour on
    the Unix platforms where it is available;
     * A bug related to this code (#474335) has gone
    unnoticed for over three years, so it is unlikely in
    the extreme that its outright removal will cause any
    ill effects;
    
    
    Summarizing the summary, this is dead code and it ought
    to be buried.
    
    
  4. foundin changed to: "None"
  5. priority changed to: "5 Medium"
  6. resolution changed to: "None"
  7. status changed to: "Open"
  8. submitter changed to: "jenglish"
  9. subsystem changed to: "None"
  10. title changed to: "Dead code: matherr, TclMathInProgress"
  11. type changed to: "Patch"