Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 79eee7a61e1a8ed99c0674529a39e2a50a6f0407
Ticket: 1783544fffffffffffffffffffffffffffffffff
TclIsNaN may get "optimized away"
User & Date: kot on 2007-08-28 17:33:14
Changes

  1. assignee changed to: "nobody"
  2. cmimetype changed to: "text/plain"
  3. comment changed to:
    When compiling on Solaris 10 using the latest Sun Studio 12 compiler (with ``-fast -xO3''), the current implementation of the TclIsNaN macro (generic/tclInt.h:3370 ``((d) != (d))'') gets optimized away and never returns true. This causes things like Tcl_PrintDouble to crash, when passed a NaN number.
    
    The attached patch changes the macro (and the adjacent one) to use the standard ones defined in math.h.
    
    There /could/ be platforms, where these standard macros aren't present -- they would need to be handled separately...
    
  4. foundin changed to: "None"
  5. is_private changed to: "0"
  6. priority changed to: "5 Medium"
  7. resolution changed to: "None"
  8. status changed to: "Open"
  9. submitter changed to: "kot"
  10. subsystem changed to: "None"
  11. title changed to: "TclIsNaN may get "optimized away""
  12. type changed to: "Bug"