mclow.lists added a comment.

> error: undefined reference to '__gxx_personality_v0'

means that you're not linking to an ABI library.

That symbol comes out of libc++abi, but you can also get that from libsupc.

My build setup is similar to yours (on Mac OS X):

  cd $LLVM_BUILD ; rm -rf libcxx ; mkdir libcxx ; cd libcxx 
  CXX=$LLVM_BIN/clang++ cmake -DLLVM_PATH=$LLVM/llvm -DLIBCXX_CXX_ABI=libcxxabi 
  make              # build libc++
  make check-libcxx # run the tests

Comment at: libcxx/include/cmath:615
-typename enable_if<!is_floating_point<_A1>::value, bool>::type
+_LIBCPP_CONSTEXPR typename enable_if<!is_floating_point<_A1>::value, 
 __libcpp_isfinite(_A1 __lcpp_x) _NOEXCEPT
I don't see how this can possibly be constexpr.
it calls `isfinite()`, which is hoisted from `::isfinite()`, which comes from 
the C library.
Since C knows nothing about constexpr, we're stuck.

I just tried this:
    constexpr float f = 3.2f;
    static_assert(::isfinite(f), "" );

and got:
    bug.cpp:9:19: error: static_assert expression is not an integral constant 
    static_assert(::isfinite(f), "" );

cfe-commits mailing list

Reply via email to