-
Notifications
You must be signed in to change notification settings - Fork 14.9k
Description
Bugzilla Link | 46760 |
Resolution | FIXED |
Resolved on | Sep 20, 2021 13:17 |
Version | 10.0 |
OS | FreeBSD |
Blocks | #44654 |
CC | @ldionne,@mclow |
Fixed by commit(s) | 9f4022f |
Extended Description
FreeBSD head, powerpc64 elfv2, LLVM 10.0.1-rc2-0-g77d76b71d7d
When compiling software that includes thread, using GCC 10.1.0 and libc++, I'm getting:
/usr/include/c++/v1/thread:370:65: error: operator '||' has no right operand
370 | #if defined(_LIBCPP_COMPILER_GCC) && (powerpc || POWERPC)
The reason is that POWERPC is undefined on FreeBSD. The proper way for this ifdef would be:
Index: contrib/llvm-project/libcxx/include/thread
--- contrib/llvm-project/libcxx/include/thread (revision 363109)
+++ contrib/llvm-project/libcxx/include/thread (working copy)
@@ -367,7 +367,7 @@
using namespace chrono;
if (__d > duration<_Rep, _Period>::zero())
{
-#if defined(_LIBCPP_COMPILER_GCC) && (powerpc || POWERPC)
+#if defined(_LIBCPP_COMPILER_GCC) && (defined(powerpc) || defined(POWERPC))
// GCC's long double const folding is incomplete for IBM128 long doubles.
_LIBCPP_CONSTEXPR duration _Max = nanoseconds::max();
#else