diff --git a/immer/detail/hamts/node.hpp b/immer/detail/hamts/node.hpp index 32b8c92a..a59954da 100644 --- a/immer/detail/hamts/node.hpp +++ b/immer/detail/hamts/node.hpp @@ -18,9 +18,13 @@ // Disable some warnings for this file as it seems to be causing various // false positives when compiling with various versions of GCC. +#if !defined(_MSC_VER) +#if defined(__GNUC__) && !defined(__clang__) #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Warray-bounds" #pragma GCC diagnostic ignored "-Wstringop-overflow" +#endif +#endif namespace immer { namespace detail { @@ -1159,4 +1163,8 @@ struct node } // namespace detail } // namespace immer +#if !defined(_MSC_VER) +#if defined(__GNUC__) && !defined(__clang__) #pragma GCC diagnostic pop +#endif +#endif diff --git a/immer/detail/rbts/node.hpp b/immer/detail/rbts/node.hpp index ca4cbf1f..df41ac18 100644 --- a/immer/detail/rbts/node.hpp +++ b/immer/detail/rbts/node.hpp @@ -21,10 +21,14 @@ // Disable some warnings for this file as it seems to be causing various // false positives when compiling with various versions of GCC. +#if !defined(_MSC_VER) +#if defined(__GNUC__) && !defined(__clang__) #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Warray-bounds" #pragma GCC diagnostic ignored "-Wstringop-overflow" #pragma GCC diagnostic ignored "-Wnonnull" +#endif +#endif namespace immer { namespace detail { @@ -1039,4 +1043,8 @@ constexpr bits_t derive_bits_leaf = derive_bits_leaf_aux(); } // namespace detail } // namespace immer +#if !defined(_MSC_VER) +#if defined(__GNUC__) && !defined(__clang__) #pragma GCC diagnostic pop +#endif +#endif