summaryrefslogtreecommitdiff
path: root/boost/atomic/detail/bitwise_cast.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'boost/atomic/detail/bitwise_cast.hpp')
-rw-r--r--boost/atomic/detail/bitwise_cast.hpp12
1 files changed, 11 insertions, 1 deletions
diff --git a/boost/atomic/detail/bitwise_cast.hpp b/boost/atomic/detail/bitwise_cast.hpp
index 1405a25d6a..4a285ecab2 100644
--- a/boost/atomic/detail/bitwise_cast.hpp
+++ b/boost/atomic/detail/bitwise_cast.hpp
@@ -25,6 +25,12 @@
#pragma once
#endif
+#if defined(BOOST_GCC) && (BOOST_GCC+0) >= 40600
+#pragma GCC diagnostic push
+// missing initializer for member var
+#pragma GCC diagnostic ignored "-Wmissing-field-initializers"
+#endif
+
namespace boost {
namespace atomics {
namespace detail {
@@ -34,7 +40,7 @@ BOOST_FORCEINLINE T* addressof(T& value) BOOST_NOEXCEPT
{
// Note: The point of using a local struct as the intermediate type instead of char is to avoid gcc warnings
// if T is a const volatile char*:
- // warning: casting ‘const volatile char* const’ to ‘const volatile char&’ does not dereference pointer
+ // warning: casting 'const volatile char* const' to 'const volatile char&' does not dereference pointer
// The local struct makes sure T is not related to the cast target type.
struct opaque_type;
return reinterpret_cast< T* >(&const_cast< opaque_type& >(reinterpret_cast< const volatile opaque_type& >(value)));
@@ -61,4 +67,8 @@ BOOST_FORCEINLINE To bitwise_cast(From const& from) BOOST_NOEXCEPT
} // namespace atomics
} // namespace boost
+#if defined(BOOST_GCC) && (BOOST_GCC+0) >= 40600
+#pragma GCC diagnostic pop
+#endif
+
#endif // BOOST_ATOMIC_DETAIL_BITWISE_CAST_HPP_INCLUDED_