[llvm-bugs] [Bug 26120] New: Testsuite uses ::fabs without <math.h>

via llvm-bugs llvm-bugs at lists.llvm.org
Tue Jan 12 03:34:09 PST 2016


https://llvm.org/bugs/show_bug.cgi?id=26120

            Bug ID: 26120
           Summary: Testsuite uses ::fabs without <math.h>
           Product: libc++
           Version: unspecified
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: All Bugs
          Assignee: unassignedclangbugs at nondot.org
          Reporter: zilla at kayari.org
                CC: llvm-bugs at lists.llvm.org, mclow.lists at gmail.com
    Classification: Unclassified

A number of tests in the testsuite (particularly unordered container tests) use
fabs() without qualification, and without #include <math.h>, only #include
<cmath> (sometimes only indirectly).

That isn't portable, because some implementations only define std::fabs() when
<cmath> is included, and relying on transitive includes is not portable either.

e.g. std/containers/unord/unord.map/unord.map.cnstr/copy.pass.cpp only includes
<cmath> indirectly, and uses fabs() without qualification, so fails to compile
using libstdc++

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20160112/c9f991c1/attachment.html>


More information about the llvm-bugs mailing list