https://bugs.llvm.org/show_bug.cgi?id=46760
Bug ID: 46760
Summary: thread:370:65: error: operator '||' has no right
operand
Product: libc++
Version: 10.0
Hardware: Other
OS: FreeBSD
Status: NEW
Severity: normal
Priority: P
Component: All Bugs
Assignee: unassignedclangb...@nondot.org
Reporter: pku...@anongoth.pl
CC: llvm-bugs@lists.llvm.org, mclow.li...@gmail.com
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<long double> _Max = nanoseconds::max();
#else
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs