http://llvm.org/bugs/show_bug.cgi?id=14850

             Bug #: 14850
           Summary: Add static analyzer suggesting std::copysign in place
                    of a/fabs(a)
           Product: clang
           Version: 3.2
          Platform: PC
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Static Analyzer
        AssignedTo: [email protected]
        ReportedBy: [email protected]
                CC: [email protected]
    Classification: Unclassified


In gcc one could enable the option -mrecip=div which has the side effect that 

a/fabs(a)

is no longer in {+1.0, -1.0, NaN}, this leads to instabilities in case the code
uses such a construct as poor man std::copysign. It would be desiderable to
have a static analyzer which can detect those constructs and warn to use
copysign instead.

-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to