From f5a9710abfb83d6b3199bb3dad1eb8c7588e3533 Mon Sep 17 00:00:00 2001 From: Jonathan Wakely Date: Mon, 21 May 2018 00:50:08 +0100 Subject: [PATCH] PR libstdc++/85843 fix "should be explicitly initialized" warnings PR libstdc++/85843 * src/c++11/cow-stdexcept.cc (logic_error, runtime_error): Explicitly initialize base class to avoid warnings. From-SVN: r260427 --- libstdc++-v3/ChangeLog | 6 ++++++ libstdc++-v3/src/c++11/cow-stdexcept.cc | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index b0d5adf2d1a..ac4a052e129 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,9 @@ +2018-05-21 Jonathan Wakely + + PR libstdc++/85843 + * src/c++11/cow-stdexcept.cc (logic_error, runtime_error): Explicitly + initialize base class to avoid warnings. + 2018-05-19 Jonathan Wakely * src/c++11/codecvt.cc (__codecvt_utf8_base::do_in) diff --git a/libstdc++-v3/src/c++11/cow-stdexcept.cc b/libstdc++-v3/src/c++11/cow-stdexcept.cc index 7b42da1e133..5ad3d94ae31 100644 --- a/libstdc++-v3/src/c++11/cow-stdexcept.cc +++ b/libstdc++-v3/src/c++11/cow-stdexcept.cc @@ -56,13 +56,13 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION // Copy constructors and assignment operators defined using COW std::string logic_error::logic_error(const logic_error& e) noexcept - : _M_msg(e._M_msg) { } + : exception(e), _M_msg(e._M_msg) { } logic_error& logic_error::operator=(const logic_error& e) noexcept { _M_msg = e._M_msg; return *this; } runtime_error::runtime_error(const runtime_error& e) noexcept - : _M_msg(e._M_msg) { } + : exception(e), _M_msg(e._M_msg) { } runtime_error& runtime_error::operator=(const runtime_error& e) noexcept