]> git.ipfire.org Git - thirdparty/gcc.git/blobdiff - libstdc++-v3/testsuite/27_io/basic_istream/extractors_arithmetic/char/exceptions_failbit.cc
Update copyright years.
[thirdparty/gcc.git] / libstdc++-v3 / testsuite / 27_io / basic_istream / extractors_arithmetic / char / exceptions_failbit.cc
index 5ad012dda4c94deb74724d3fe66aaa3a781ea882..cf58cf5142f7dab7ec43069b4dd372423a422186 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2003-2015 Free Software Foundation, Inc.
+// Copyright (C) 2003-2020 Free Software Foundation, Inc.
 //
 // This file is part of the GNU ISO C++ Library.  This library is free
 // software; you can redistribute it and/or modify it under the
@@ -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>
 
@@ -26,24 +23,23 @@ template<typename T>
 void test_failbit()
 {
   using namespace std;
-  bool test __attribute__((unused)) = true;
 
   istringstream stream("jaylib - champion sound");
   stream.exceptions(ios_base::failbit);
-  
+
   try
     {
       T i;
       stream >> i;
       VERIFY( false );
     }
-  catch (const ios_base::failure&)
-    { 
+  catch (const std::ios_base::failure&)
+    {
       // stream should set failbit and throw ios_base::failure.
       VERIFY( stream.fail() );
       VERIFY( !stream.bad() );
       VERIFY( !stream.eof() );
-    }  
+    }
   catch(...)
     { VERIFY( false ); }
 }