[llvm-bugs] [Bug 37597] New: math.h conflicting noexcept declaration

via llvm-bugs llvm-bugs at lists.llvm.org
Fri May 25 15:55:20 PDT 2018


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

            Bug ID: 37597
           Summary: math.h conflicting noexcept declaration
           Product: libc++
           Version: 6.0
          Hardware: Sun
                OS: Solaris
            Status: NEW
          Severity: normal
          Priority: P
         Component: All Bugs
          Assignee: unassignedclangbugs at nondot.org
          Reporter: phantall at gmail.com
                CC: llvm-bugs at lists.llvm.org, mclow.lists at gmail.com

Building on Solaris 10 / sparcv9 hardware:

    cmake ../src/llvm \
    -DCMAKE_C_COMPILER=gcc-7.2.0 \
    -DCMAKE_CXX_COMPILER=g++-7.2.0 \
    -DGCC_INSTALL_PREFIX=$(dirname $(dirname $(which gcc-7.2.0))) \
    -DCMAKE_BUILD_TYPE=RelWithDebInfo

    make -j32

I get the following compile error:

    In file included from (...)/projects/libcxx/src/debug.cpp:10:0:
    (...)/projects/libcxx/include/math.h: In function 'float acosh(float)':
    (...)/projects/libcxx/include/__config:776:21: error: 'float acosh(float)'
conflicts with a previous declaration
     #  define _NOEXCEPT noexcept
                         ^
    (...)/projects/libcxx/include/math.h:1038:68: note: in expansion of macro
'_NOEXCEPT'
     inline _LIBCPP_INLINE_VISIBILITY float       acosh(float __lcpp_x)
_NOEXCEPT       {return ::acoshf(__lcpp_x);}
                                                                       
^~~~~~~~~

... for 34 functions declared in math.h:

acosh, asinh, atanh, cbrt, copysign, erf, erfc, exp2, expm1, fdim, fma, fmax,
fmin, hypot, ilogb, lgamma, llrint, llround, log1p, log2, logb, lrint, lround,
nearbyint, nextafter, nexttoward, remainder, remquo, rint, round, scalbln,
scalbn, tgamma, trunc

-- 
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/20180525/2be98795/attachment.html>


More information about the llvm-bugs mailing list