diff mbox

fix libstdc++/58912

Message ID CAH6eHdTMkVXQiyA5b8JK_=SqFdJHewW7GboHLgxt9LbY9ovEAg@mail.gmail.com
State New
Headers show

Commit Message

Jonathan Wakely Oct. 30, 2013, 3:16 p.m. UTC
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  <cvs@cs.utoronto.ca>

        PR libstdc++/58912
        * include/bits/shared_ptr_base.h (_Sp_counted_ptr_inplace): Remove
        unnecessary initialization of storage buffer.
diff mbox

Patch

--- 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