summaryrefslogtreecommitdiff
path: root/libstdc++-v3/include
diff options
context:
space:
mode:
Diffstat (limited to 'libstdc++-v3/include')
-rw-r--r--libstdc++-v3/include/bits/fstream.tcc4
-rw-r--r--libstdc++-v3/include/std/fstream7
2 files changed, 7 insertions, 4 deletions
diff --git a/libstdc++-v3/include/bits/fstream.tcc b/libstdc++-v3/include/bits/fstream.tcc
index f23ff7af4eb6..08cf189ee06c 100644
--- a/libstdc++-v3/include/bits/fstream.tcc
+++ b/libstdc++-v3/include/bits/fstream.tcc
@@ -239,13 +239,11 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
if (!_M_terminate_output())
__testfail = true;
}
- __catch(__cxxabiv1::__forced_unwind&)
+ __catch(...)
{
_M_file.close();
__throw_exception_again;
}
- __catch(...)
- { __testfail = true; }
}
if (!_M_file.close())
diff --git a/libstdc++-v3/include/std/fstream b/libstdc++-v3/include/std/fstream
index 3a5895d68b03..05661d9d58f1 100644
--- a/libstdc++-v3/include/std/fstream
+++ b/libstdc++-v3/include/std/fstream
@@ -244,7 +244,12 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
*/
virtual
~basic_filebuf()
- { this->close(); }
+ {
+ __try
+ { this->close(); }
+ __catch(...)
+ { }
+ }
#if __cplusplus >= 201103L
basic_filebuf& operator=(const basic_filebuf&) = delete;