On 3 December 2016 at 13:31, Aditya K <hiradi...@msn.com> wrote: > --- > libstdc++-v3/ChangeLog | 3 +++ > libstdc++-v3/src/c++11/shared_ptr.cc | 4 ++-- > 2 files changed, 5 insertions(+), 2 deletions(-) > > diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog > index 08d9229..18924c4 100644 > --- a/libstdc++-v3/ChangeLog > +++ b/libstdc++-v3/ChangeLog > @@ -1,3 +1,6 @@ > +2016-12-03 Aditya Kumar <hiradi...@msn.com> > + * src/c++11/shared_ptr.cc: Added noexcept on constructors. > + > 2016-12-01 David Edelsohn <dje....@gmail.com>
Please separate the ChangeLogs from patches - Changelog needs to be temporally linear, and doesn't merge well. For reference, see the ChangeLog part of https://gcc.gnu.org/contribute.html > diff --git a/libstdc++-v3/src/c++11/shared_ptr.cc > b/libstdc++-v3/src/c++11/shared_ptr.cc > index 9028040..b4addd0 100644 > --- a/libstdc++-v3/src/c++11/shared_ptr.cc > +++ b/libstdc++-v3/src/c++11/shared_ptr.cc > @@ -56,7 +56,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION > { return _Hash_impl::hash(addr) & __gnu_internal::mask; } > } > > - _Sp_locker::_Sp_locker(const void* p) > + _Sp_locker::_Sp_locker(const void* p) noexcept > { > if (__gthread_active_p()) > { > @@ -67,7 +67,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION > _M_key1 = _M_key2 = __gnu_internal::invalid; > } > > - _Sp_locker::_Sp_locker(const void* p1, const void* p2) > + _Sp_locker::_Sp_locker(const void* p1, const void* p2) noexcept > { > if (__gthread_active_p()) > { It would be helpful to mention rationale for patches, and add tests to verify correct functionality. However, in this case it's fairly obvious that the noexcept-spec of the class definition declarations of these constructors disagree with the definitions.