[libcxx-commits] [PATCH] D81438: [libc++] Work around gcc/Power9 bug in `include/thread`
Joel E. Denny via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Mon Jun 8 16:39:51 PDT 2020
jdenny created this revision.
jdenny added reviewers: mclow.lists, ken-cunningham-webuse, ikitayama, EricWF.
Herald added a project: libc++.
Herald added a reviewer: libc++.
This fixes PR39696, which breaks the libcxx build with gcc (I tested
7.5.0) on Power9. This fix was suggested at
https://bugs.llvm.org/show_bug.cgi?id=39696#c38
but never applied.
Fixes https://llvm.org/PR39696
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D81438
Files:
libcxx/include/thread
Index: libcxx/include/thread
===================================================================
--- libcxx/include/thread
+++ libcxx/include/thread
@@ -365,9 +365,9 @@
{
#if defined(_LIBCPP_COMPILER_GCC) && (__powerpc__ || __POWERPC__)
// GCC's long double const folding is incomplete for IBM128 long doubles.
- _LIBCPP_CONSTEXPR duration<long double> _Max = nanoseconds::max();
-#else
_LIBCPP_CONSTEXPR duration<long double> _Max = duration<long double>(ULLONG_MAX/1000000000ULL) ;
+#else
+ _LIBCPP_CONSTEXPR duration<long double> _Max = nanoseconds::max();
#endif
nanoseconds __ns;
if (__d < _Max)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D81438.269377.patch
Type: text/x-patch
Size: 655 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20200608/308c96d8/attachment.bin>
More information about the libcxx-commits
mailing list