[PATCH] PR66145 use new ABI for std::ios::failure exceptions

Jonathan Wakely jwakely@redhat.com
Fri Feb 3 19:27:00 GMT 2017


On 16/01/17 15:57 +0000, Jonathan Wakely wrote:
>This changes the version of std::ios_base::failure thrown by
>libstdc++.so to be the new __cxx11 ABI one, matching the default for
>headers that are trying to catch the exception.
>
>There's no simple way to do this as an easy transition, but hopefully
>by now most people are either using the new ABI or building GCC
>without the dual ABI.
>
>
>	PR libstdc++/66145
>	* src/c++11/functexcept.cc: Use new ABI for std::ios_base::failure
>	exceptions.
>	* testsuite/27_io/basic_ios/copyfmt/char/1.cc: Don't override ABI
>	for test, so new ios::failure can be caught.
>	* testsuite/27_io/basic_ios/exceptions/char/1.cc: Likewise.
>	* testsuite/27_io/basic_istream/extractors_arithmetic/char/
>	exceptions_failbit.cc: Likewise.
>	* testsuite/27_io/basic_istream/extractors_arithmetic/wchar_t/
>	exceptions_failbit.cc: Likewise.
>	* testsuite/27_io/basic_istream/extractors_other/char/
>	exceptions_null.cc: Likewise.
>	* testsuite/27_io/basic_istream/extractors_other/wchar_t/
>	exceptions_null.cc: Likewise.
>	* testsuite/27_io/basic_istream/sentry/char/12297.cc: Likewise.
>	* testsuite/27_io/basic_istream/sentry/wchar_t/12297.cc: Likewise.
>	* testsuite/27_io/basic_ostream/inserters_other/char/
>	exceptions_null.cc: Likewise.
>	* testsuite/27_io/basic_ostream/inserters_other/wchar_t/
>	exceptions_null.cc: Likewise.
>	* testsuite/27_io/ios_base/storage/2.cc: Likewise.

Instead of just removing these overrides from the tests:

>-// The library still throws the original definition of std::ios::failure
>-// { dg-options "-D_GLIBCXX_USE_CXX11_ABI=0" }

I should have flipped the override to force the new ABI, otherwise
those tests fail when the library is configured with
--with-default-libstdcxx-default-abi=gcc4-compatible

This puts them back, adjusts the comment, and changes the value.

Tested powerpc64le-linux, with gcc4-compatible and without dual-abi.

Committed to trunk.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch.txt
Type: text/x-patch
Size: 8369 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/libstdc++/attachments/20170203/b60104f2/attachment.bin>


More information about the Libstdc++ mailing list