PR66145 use new ABI for std::ios::failure exceptions
authorJonathan Wakely <jwakely@redhat.com>
Mon, 16 Jan 2017 15:58:06 +0000 (15:58 +0000)
committerJonathan Wakely <redi@gcc.gnu.org>
Mon, 16 Jan 2017 15:58:06 +0000 (15:58 +0000)
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

13 files changed:
libstdc++-v3/ChangeLog
libstdc++-v3/src/c++11/functexcept.cc
libstdc++-v3/testsuite/27_io/basic_ios/copyfmt/char/1.cc
libstdc++-v3/testsuite/27_io/basic_ios/exceptions/char/1.cc
libstdc++-v3/testsuite/27_io/basic_istream/extractors_arithmetic/char/exceptions_failbit.cc
libstdc++-v3/testsuite/27_io/basic_istream/extractors_arithmetic/wchar_t/exceptions_failbit.cc
libstdc++-v3/testsuite/27_io/basic_istream/extractors_other/char/exceptions_null.cc
libstdc++-v3/testsuite/27_io/basic_istream/extractors_other/wchar_t/exceptions_null.cc
libstdc++-v3/testsuite/27_io/basic_istream/sentry/char/12297.cc
libstdc++-v3/testsuite/27_io/basic_istream/sentry/wchar_t/12297.cc
libstdc++-v3/testsuite/27_io/basic_ostream/inserters_other/char/exceptions_null.cc
libstdc++-v3/testsuite/27_io/basic_ostream/inserters_other/wchar_t/exceptions_null.cc
libstdc++-v3/testsuite/27_io/ios_base/storage/2.cc

index 7df1748053ed6306fa42ca644bd949e200506593..17c716a948ed683c60196498343a6c8a7cc2a41d 100644 (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.
index 3210619d65f23efb4101855933ddb2b636ecbd62..6281534b92a05f3d9888da06cb588199896105f6 100644 (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>
index e1a30f3dad15adabf32a6d22e8954e1b331250d5..d922b1847bd4e24a7388cf237462c6b44a71f34b 100644 (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.
index df073cf094e2b307d62579855ac06f5eb65d47ba..a7f829a19cc9ef8fdd737a1e13c764e3727306c8 100644 (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.
index ecbbf18df25336b90abf32fa350cf34f170098b3..ab4d7b139a81eb81c66f5277245dd2879a5c5a76 100644 (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>
 
index ebe8f70bf1ec8ceb436c52de3b58e16c5cea2d12..f9537e05e44b7428edff79781b2a9357c98604cb 100644 (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>
 
index 7ff320466ed78dfd4545e0479c77a68ac14cba65..d508f0a28231aec86e5cd9df2cdaa93991aa9aca 100644 (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>
index 499ed774e78d5ed4bb0b2e9518722d141e0905b1..63b35706c8419bd51d3d2a44a2ddce8416afc577 100644 (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>
index 50829fdebfaadc3174c0ce2f5c231d5166852bd3..bd99187580b351c10c1226b877bfcecbc549d0e5 100644 (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>
 
index f56ad5543c90f7f975f2bde507499e8429ad255b..86713dc021a54dcc2446e2e8d9c9bf9b86fd1e43 100644 (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>
index d83fe7f26054f3e89e95c2d095ec9cc12b767471..a19cc3f80a2f964dd8d6e030f13f7c8532ffeb6c 100644 (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>
index ddf38db91ec721fd0205732b0746afc4ce3c3107..e449837b73cc390a45bf7f809291ded71f876c1d 100644 (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>
index 4a9e1201ea916555bc3311794cc543b09688f01c..a5b9f64c66a3918b9c57e3214ba04a45ad9286da 100644 (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>