diff --git a/lib/kokkos/core/src/desul/atomics/Generic.hpp b/lib/kokkos/core/src/desul/atomics/Generic.hpp index fbb3ba4698..19d7a453fa 100644 --- a/lib/kokkos/core/src/desul/atomics/Generic.hpp +++ b/lib/kokkos/core/src/desul/atomics/Generic.hpp @@ -10,7 +10,7 @@ SPDX-License-Identifier: (BSD-3-Clause) #define DESUL_ATOMICS_GENERIC_HPP_ #include -#if defined(__GNUC__) +#if defined(__GNUC__) && (!defined(__clang__)) #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wstrict-aliasing" #endif @@ -688,7 +688,7 @@ DESUL_INLINE_FUNCTION bool atomic_compare_exchange_weak(T* const dest, #include #include #include -#if defined(__GNUC__) +#if defined(__GNUC__) && (!defined(__clang__)) #pragma GCC diagnostic pop #endif #endif