[PATCH] D58966: [libc++] Fix <atomic> failures on GCC

Zoe Carver via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 5 10:57:59 PST 2019


zoecarver added inline comments.


================
Comment at: libcxx/trunk/include/atomic:1458
       _LIBCPP_CHECK_STORE_MEMORY_ORDER(__m)
-        {__cxx_atomic_store(&__a_, __d, static_cast<__memory_order_underlying_t>(__m));}
+        {__cxx_atomic_store(&__a_, __d, __m);}
     _LIBCPP_INLINE_VISIBILITY
----------------
ldionne wrote:
> zoecarver wrote:
> > ldionne wrote:
> > > zoecarver wrote:
> > > > Some reason these arent `static_cast`ed?
> > > Yes -- all the `__cxx_atomic_foo` functions take a `memory_order` argument, not an `int`.
> > Oh, my bad. How did this pass the tests then..?
> The mismatch was only under the GCC implementation.
Ah, I see, thanks for the clarification. 


Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D58966/new/

https://reviews.llvm.org/D58966





More information about the llvm-commits mailing list