PR66145 use new ABI for std::ios::failure exceptions

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.

From-SVN: r244498
This commit is contained in:
Jonathan Wakely 2017-01-16 15:58:06 +00:00 committed by Jonathan Wakely
parent b336037ddc
commit 83291b8b8c
13 changed files with 25 additions and 35 deletions

View File

@ -1,5 +1,27 @@
2017-01-16 Jonathan Wakely <jwakely@redhat.com>
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.
PR libstdc++/78702
* include/bits/locale_classes.h (locale::facet::__shim): Change from
private to protected.

View File

@ -20,8 +20,9 @@
// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
// <http://www.gnu.org/licenses/>.
// We don't want to change the type thrown by __throw_ios_failure (yet?)
#define _GLIBCXX_USE_CXX11_ABI 0
// Determines the version of ios_base::failure thrown by __throw_ios_failure.
// If !_GLIBCXX_USE_DUAL_ABI this will get undefined automatically.
#define _GLIBCXX_USE_CXX11_ABI 1
#include <bits/functexcept.h>
#include <cstdlib>

View File

@ -17,9 +17,6 @@
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
// The library still throws the original definition of std::ios::failure
// { dg-options "-D_GLIBCXX_USE_CXX11_ABI=0" }
// 27.4.4.2 basic_ios member functions
// NB: Don't include any other headers in this file.

View File

@ -17,9 +17,6 @@
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
// The library still throws the original definition of std::ios::failure
// { dg-options "-D_GLIBCXX_USE_CXX11_ABI=0" }
// 27.4.4.2 basic_ios member functions
// NB: Don't include any other headers in this file.

View File

@ -15,9 +15,6 @@
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
// The library still throws the original definition of std::ios::failure
// { dg-options "-D_GLIBCXX_USE_CXX11_ABI=0" }
#include <sstream>
#include <testsuite_hooks.h>

View File

@ -15,9 +15,6 @@
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
// The library still throws the original definition of std::ios::failure
// { dg-options "-D_GLIBCXX_USE_CXX11_ABI=0" }
#include <sstream>
#include <testsuite_hooks.h>

View File

@ -15,9 +15,6 @@
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
// The library still throws the original definition of std::ios::failure
// { dg-options "-D_GLIBCXX_USE_CXX11_ABI=0" }
#include <istream>
#include <ostream>
#include <streambuf>

View File

@ -15,9 +15,6 @@
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
// The library still throws the original definition of std::ios::failure
// { dg-options "-D_GLIBCXX_USE_CXX11_ABI=0" }
#include <istream>
#include <ostream>
#include <streambuf>

View File

@ -18,9 +18,6 @@
// 27.6.1.1.2 class basic_istream::sentry
// The library still throws the original definition of std::ios::failure
// { dg-options "-D_GLIBCXX_USE_CXX11_ABI=0" }
#include <sstream>
#include <testsuite_hooks.h>

View File

@ -15,9 +15,6 @@
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
// The library still throws the original definition of std::ios::failure
// { dg-options "-D_GLIBCXX_USE_CXX11_ABI=0" }
// 27.6.1.1.2 class basic_istream::sentry
#include <sstream>

View File

@ -15,9 +15,6 @@
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
// The library still throws the original definition of std::ios::failure
// { dg-options "-D_GLIBCXX_USE_CXX11_ABI=0" }
#include <istream>
#include <ostream>
#include <streambuf>

View File

@ -15,9 +15,6 @@
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
// The library still throws the original definition of std::ios::failure
// { dg-options "-D_GLIBCXX_USE_CXX11_ABI=0" }
#include <istream>
#include <ostream>
#include <streambuf>

View File

@ -28,9 +28,6 @@
// Radar 6467884: 10.X systems are not robust when paging space is exceeded
// { dg-skip-if "" { *-*-darwin* && lp64 } { "*" } { "" } }
// The library still throws the original definition of std::ios::failure
// { dg-options "-D_GLIBCXX_USE_CXX11_ABI=0" }
#include <sstream>
#include <iostream>
#include <limits>