From 54df58853072de7f16cb4a30c3c04c3302ea534d Mon Sep 17 00:00:00 2001 From: Jonathan Wakely Date: Fri, 10 Nov 2017 21:43:24 +0000 Subject: [PATCH] PR libstdc++/82917 add missing returns in PR libstdc++/82917 * include/std/fstream (basic_ifstream::open, basic_ofstream::open) (basic_fstream::open): Fix missing return. From-SVN: r254638 --- libstdc++-v3/ChangeLog | 6 ++++++ libstdc++-v3/include/std/fstream | 6 +++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 0c5786b1f96..7f3c5302de7 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,9 @@ +2017-11-10 Jonathan Wakely + + PR libstdc++/82917 + * include/std/fstream (basic_ifstream::open, basic_ofstream::open) + (basic_fstream::open): Fix missing return. + 2017-11-07 Jonathan Wakely * src/filesystem/ops-common.h (make_file_type) [S_ISSOCK]: Only use diff --git a/libstdc++-v3/include/std/fstream b/libstdc++-v3/include/std/fstream index a3324c004d7..26176afccd0 100644 --- a/libstdc++-v3/include/std/fstream +++ b/libstdc++-v3/include/std/fstream @@ -663,7 +663,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION template auto open(const _Path& __s, ios_base::openmode __mode = ios_base::in) - -> decltype(_M_filebuf.open(__s, __mode)) + -> decltype((void)_M_filebuf.open(__s, __mode)) { open(__s.c_str(), __mode); } #endif // C++17 #endif // C++11 @@ -891,7 +891,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION template auto open(const _Path& __s, ios_base::openmode __mode = ios_base::out) - -> decltype(_M_filebuf.open(__s, __mode)) + -> decltype((void)_M_filebuf.open(__s, __mode)) { open(__s.c_str(), __mode); } #endif // C++17 #endif // C++11 @@ -1118,7 +1118,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION auto open(const _Path& __s, ios_base::openmode __mode = ios_base::in | ios_base::out) - -> decltype(_M_filebuf.open(__s, __mode)) + -> decltype((void)_M_filebuf.open(__s, __mode)) { open(__s.c_str(), __mode); } #endif // C++17 #endif // C++11 -- 2.30.2