From: Chris Studholme Date: Wed, 30 Oct 2013 18:26:53 +0000 (+0000) Subject: re PR libstdc++/58912 (make_shared value initializes storage space even when not... X-Git-Tag: releases/gcc-4.7.4~424 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=737be65b1b57502a7e29044bd765343e2dc66f03;p=thirdparty%2Fgcc.git re PR libstdc++/58912 (make_shared value initializes storage space even when not desired) 2013-10-30 Chris Studholme PR libstdc++/58912 * include/bits/shared_ptr_base.h (_Sp_counted_ptr_inplace): Remove unnecessary initialization of storage buffer. From-SVN: r204222 --- diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index e2d98ee72a98..750cdcc0ed8d 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,9 @@ +2013-10-30 Chris Studholme + + PR libstdc++/58912 + * include/bits/shared_ptr_base.h (_Sp_counted_ptr_inplace): Remove + unnecessary initialization of storage buffer. + 2013-10-20 Chris Jefferson Paolo Carlini diff --git a/libstdc++-v3/include/bits/shared_ptr_base.h b/libstdc++-v3/include/bits/shared_ptr_base.h index 0d60eeffa5bb..3d4d12ba3128 100644 --- a/libstdc++-v3/include/bits/shared_ptr_base.h +++ b/libstdc++-v3/include/bits/shared_ptr_base.h @@ -394,7 +394,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION public: template _Sp_counted_ptr_inplace(_Alloc __a, _Args&&... __args) - : _M_impl(__a), _M_storage() + : _M_impl(__a) { _M_impl._M_ptr = static_cast<_Tp*>(static_cast(&_M_storage)); // _GLIBCXX_RESOLVE_LIB_DEFECTS