-// 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
// 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>
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 ); }
}