From 066b398114ab48c81c875e95459c15c2416a7891 Mon Sep 17 00:00:00 2001 From: Peter Dimov Date: Mon, 27 Apr 2020 00:50:15 +0300 Subject: [PATCH] Disable -Wc11-extensions in sp_counted_base_clang.hpp --- .../boost/smart_ptr/detail/sp_counted_base_clang.hpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/include/boost/smart_ptr/detail/sp_counted_base_clang.hpp b/include/boost/smart_ptr/detail/sp_counted_base_clang.hpp index 89bcfb8..2c3938f 100644 --- a/include/boost/smart_ptr/detail/sp_counted_base_clang.hpp +++ b/include/boost/smart_ptr/detail/sp_counted_base_clang.hpp @@ -26,6 +26,16 @@ namespace boost namespace detail { +#if defined(__clang__) +# pragma clang diagnostic push +#endif + +#if defined(__clang__) && defined(__has_warning) +# if __has_warning( "-Wc11-extensions" ) +# pragma clang diagnostic ignored "-Wc11-extensions" +# endif +#endif + typedef _Atomic( boost::int_least32_t ) atomic_int_least32_t; inline void atomic_increment( atomic_int_least32_t * pw ) BOOST_SP_NOEXCEPT @@ -61,7 +71,6 @@ inline boost::int_least32_t atomic_conditional_increment( atomic_int_least32_t * } #if defined(__clang__) -# pragma clang diagnostic push # pragma clang diagnostic ignored "-Wweak-vtables" #endif