Re: [PATCH] PR libstdc++/85222 allow catching iostream errors as gcc4-compatible ios::failure

2018-04-13 Thread Jonathan Wakely
On 13 April 2018 at 11:22, Jakub Jelinek wrote: > On Fri, Apr 13, 2018 at 11:19:35AM +0100, Jonathan Wakely wrote: >> --- a/libstdc++-v3/src/c++11/Makefile.am >> +++ b/libstdc++-v3/src/c++11/Makefile.am >> @@ -128,10 +128,7 @@ hashtable_c++0x.o: hashtable_c++0x.cc >> >> if ENABLE_DUAL_ABI >> # Re

Re: [PATCH] PR libstdc++/85222 allow catching iostream errors as gcc4-compatible ios::failure

2018-04-13 Thread Jakub Jelinek
On Fri, Apr 13, 2018 at 11:19:35AM +0100, Jonathan Wakely wrote: > --- a/libstdc++-v3/src/c++11/Makefile.am > +++ b/libstdc++-v3/src/c++11/Makefile.am > @@ -128,10 +128,7 @@ hashtable_c++0x.o: hashtable_c++0x.cc > > if ENABLE_DUAL_ABI > # Rewrite the type info for __ios_failure. > -rewrite_ios_

Re: [PATCH] PR libstdc++/85222 allow catching iostream errors as gcc4-compatible ios::failure

2018-04-13 Thread Jonathan Wakely
Darwin has double underscores at the start of mangled names, so this fixes the sed command to be more flexible. Committed to trunk and gcc-7-branch. commit f80944837b4c21016d826bff5f497ceda85b9894 Author: Jonathan Wakely Date: Fri Apr 13 10:44:08 2018 +0100 Fix __iosfail_type_info hack to

Re: [PATCH] PR libstdc++/85222 allow catching iostream errors as gcc4-compatible ios::failure

2018-04-12 Thread Jonathan Wakely
This fixes some comments with misspelled files and classes. Committed to trunk and gcc-7-branch. It occurred to me that the name of the new __ios_failure type is visible in the verbose terminate handler messages: terminate called after throwing an instance of 'std::__ios_failure' what(): basic

Re: [PATCH] PR libstdc++/85222 allow catching iostream errors as gcc4-compatible ios::failure

2018-04-12 Thread Jonathan Wakely
On 10 April 2018 at 00:36, Jonathan Wakely wrote: > Define a new exception type derived from std::ios::failure[abi:cxx11] > which also aggregates an object of the gcc4-compatible ios::failure > type. Make __throw_ios_failure throw this new type for iostream errors > that raise exceptions. Provide c

Re: [PATCH] PR libstdc++/85222 allow catching iostream errors as gcc4-compatible ios::failure

2018-04-10 Thread Richard Biener
On Tue, 10 Apr 2018, Jonathan Wakely wrote: > Define a new exception type derived from std::ios::failure[abi:cxx11] > which also aggregates an object of the gcc4-compatible ios::failure > type. Make __throw_ios_failure throw this new type for iostream errors > that raise exceptions. Provide custom

[PATCH] PR libstdc++/85222 allow catching iostream errors as gcc4-compatible ios::failure

2018-04-09 Thread Jonathan Wakely
Define a new exception type derived from std::ios::failure[abi:cxx11] which also aggregates an object of the gcc4-compatible ios::failure type. Make __throw_ios_failure throw this new type for iostream errors that raise exceptions. Provide custom type info for the new type so that it can be caught