diff --git a/libcxx/include/atomic b/libcxx/include/atomic --- a/libcxx/include/atomic +++ b/libcxx/include/atomic @@ -945,7 +945,14 @@ _LIBCPP_INLINE_VISIBILITY _Tp __cxx_atomic_load(__cxx_atomic_base_impl<_Tp> const volatile* __a, memory_order __order) _NOEXCEPT { using __ptr_type = typename remove_const__a_value)>::type*; +#ifdef _AIX + _LIBCPP_DIAGNOSTIC_PUSH + _LIBCPP_CLANG_DIAGNOSTIC_IGNORED(-Watomic-alignment) +#endif return __c11_atomic_load(const_cast<__ptr_type>(&__a->__a_value), static_cast<__memory_order_underlying_t>(__order)); +#ifdef _AIX + _LIBCPP_DIAGNOSTIC_POP +#endif } template _LIBCPP_INLINE_VISIBILITY @@ -994,6 +1001,10 @@ return __c11_atomic_compare_exchange_weak(&__a->__a_value, __expected, __value, static_cast<__memory_order_underlying_t>(__success), static_cast<__memory_order_underlying_t>(__to_failure_order(__failure))); } +#ifdef _AIX + _LIBCPP_DIAGNOSTIC_PUSH + _LIBCPP_CLANG_DIAGNOSTIC_IGNORED(-Watomic-alignment) +#endif template _LIBCPP_INLINE_VISIBILITY _Tp __cxx_atomic_fetch_add(__cxx_atomic_base_impl<_Tp> volatile* __a, _Tp __delta, memory_order __order) _NOEXCEPT { @@ -1004,6 +1015,9 @@ _Tp __cxx_atomic_fetch_add(__cxx_atomic_base_impl<_Tp> * __a, _Tp __delta, memory_order __order) _NOEXCEPT { return __c11_atomic_fetch_add(&__a->__a_value, __delta, static_cast<__memory_order_underlying_t>(__order)); } +#ifdef _AIX + _LIBCPP_DIAGNOSTIC_POP +#endif template _LIBCPP_INLINE_VISIBILITY @@ -1019,7 +1033,14 @@ template _LIBCPP_INLINE_VISIBILITY _Tp __cxx_atomic_fetch_sub(__cxx_atomic_base_impl<_Tp> volatile* __a, _Tp __delta, memory_order __order) _NOEXCEPT { +#ifdef _AIX + _LIBCPP_DIAGNOSTIC_PUSH + _LIBCPP_CLANG_DIAGNOSTIC_IGNORED(-Watomic-alignment) +#endif return __c11_atomic_fetch_sub(&__a->__a_value, __delta, static_cast<__memory_order_underlying_t>(__order)); +#ifdef _AIX + _LIBCPP_DIAGNOSTIC_POP +#endif } template _LIBCPP_INLINE_VISIBILITY