From b8b792babfa63ce2f59104117c961e96d8e265a7 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Mon, 23 Jul 2012 16:07:11 +0100 Subject: Related: boost#4127 strict-aliasing rules warning Change-Id: I9b4f9009c29276054ff94a427adf51c2094377b5 --- boost/boost.4127.warnings.patch | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 boost/boost.4127.warnings.patch (limited to 'boost/boost.4127.warnings.patch') diff --git a/boost/boost.4127.warnings.patch b/boost/boost.4127.warnings.patch new file mode 100644 index 000000000000..11a955fd301a --- /dev/null +++ b/boost/boost.4127.warnings.patch @@ -0,0 +1,19 @@ +--- misc/boost_1_44_0/boost/smart_ptr/make_shared.hpp (revision 69250) ++++ misc/build/boost_1_44_0/boost/smart_ptr/make_shared.hpp (revision 69251) +@@ -50,5 +50,16 @@ + if( initialized_ ) + { ++#if defined( __GNUC__ ) ++ ++ // fixes incorrect aliasing warning ++ T * p = reinterpret_cast< T* >( storage_.data_ ); ++ p->~T(); ++ ++#else ++ + reinterpret_cast< T* >( storage_.data_ )->~T(); ++ ++#endif ++ + initialized_ = false; + } -- cgit