This isn't a regression but is tiny and removes an unnecessary
pessimisation, so I'm committing it to the 4.7 and 4.8 branches.  The
problem doesn't exist on the trunk.

Tested x86_64-linux.

2013-10-30  Chris Studholme  <c...@cs.utoronto.ca>

        PR libstdc++/58912
        * include/bits/shared_ptr_base.h (_Sp_counted_ptr_inplace): Remove
        unnecessary initialization of storage buffer.
--- 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<typename... _Args>
        _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<void*>(&_M_storage));
          // _GLIBCXX_RESOLVE_LIB_DEFECTS

Reply via email to