From 2d07c3f562e68955ed7067f7145a1ca416a8dafd Mon Sep 17 00:00:00 2001 From: Brad Spencer Date: Fri, 26 Sep 2003 20:20:55 +0000 Subject: [PATCH] 10132-1.cc: Explicitly qualify exceptions. 2003-09-26 Brad Spencer * testsuite/27_io/basic_filebuf/cons/wchar_t/10132-1.cc: Explicitly qualify exceptions. * testsuite/27_io/basic_istream/sentry/char/3983-fstream.cc: Same. * testsuite/27_io/basic_istream/sentry/char/3983-sstream.cc: Same. * testsuite/27_io/basic_ostream/sentry/char/3983-fstream.cc: Same. * testsuite/27_io/basic_ostream/sentry/char/3983-sstream.cc: Same. From-SVN: r71832 --- libstdc++-v3/ChangeLog | 9 +++++++ .../basic_filebuf/cons/wchar_t/10132-1.cc | 9 ++++--- .../basic_istream/sentry/char/3983-fstream.cc | 24 +++++++++---------- .../basic_istream/sentry/char/3983-sstream.cc | 23 +++++++++--------- .../basic_ostream/sentry/char/3983-fstream.cc | 11 ++++----- .../basic_ostream/sentry/char/3983-sstream.cc | 11 ++++----- 6 files changed, 43 insertions(+), 44 deletions(-) diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 7729b7bbd6b..38a115dd00d 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,12 @@ +2003-09-26 Brad Spencer + + * testsuite/27_io/basic_filebuf/cons/wchar_t/10132-1.cc: + Explicitly qualify exceptions. + * testsuite/27_io/basic_istream/sentry/char/3983-fstream.cc: Same. + * testsuite/27_io/basic_istream/sentry/char/3983-sstream.cc: Same. + * testsuite/27_io/basic_ostream/sentry/char/3983-fstream.cc: Same. + * testsuite/27_io/basic_ostream/sentry/char/3983-sstream.cc: Same. + 2003-09-25 Paolo Carlini PR libstdc++/12352 diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/cons/wchar_t/10132-1.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/cons/wchar_t/10132-1.cc index 04f4b44358e..503073ea900 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/cons/wchar_t/10132-1.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/cons/wchar_t/10132-1.cc @@ -33,20 +33,19 @@ protected: int main() { - using namespace std; bool test __attribute__((unused)) = true; - locale loc = locale(locale::classic(), new Cvt); - wfilebuf* fb = new wfilebuf; + std::locale loc = std::locale(std::locale::classic(), new Cvt); + std::wfilebuf* fb = new std::wfilebuf; fb->pubimbue(loc); - fb->open("tmp_10132", ios_base::out); + fb->open("tmp_10132", std::ios_base::out); fb->sputc(L'a'); try { delete fb; } - catch(exception& obj) + catch(std::exception& obj) { VERIFY( false ); } diff --git a/libstdc++-v3/testsuite/27_io/basic_istream/sentry/char/3983-fstream.cc b/libstdc++-v3/testsuite/27_io/basic_istream/sentry/char/3983-fstream.cc index e9e302bf7ee..d285bc11367 100644 --- a/libstdc++-v3/testsuite/27_io/basic_istream/sentry/char/3983-fstream.cc +++ b/libstdc++-v3/testsuite/27_io/basic_istream/sentry/char/3983-fstream.cc @@ -124,49 +124,47 @@ namespace std // Sentry uses locale info, so have to try one formatted input/output. void test03() { - using namespace std; bool test __attribute__((unused)) = true; // input streams - basic_ifstream ifs_uc; + std::basic_ifstream ifs_uc; unsigned char arr[6] = { 'a', 'b', 'c', 'd', 'e' }; - try { int i; ifs_uc >> i; } - catch (bad_cast& obj) + catch (std::bad_cast& obj) { } - catch (exception& obj) + catch (std::exception& obj) { test = false; } try { ifs_uc >> arr; } - catch (bad_cast& obj) + catch (std::bad_cast& obj) { } - catch (exception& obj) + catch (std::exception& obj) { test = false; } try { - ifs_uc >> ws; + ifs_uc >> std::ws; } - catch (bad_cast& obj) + catch (std::bad_cast& obj) { } - catch (exception& obj) + catch (std::exception& obj) { test = false; } try { - basic_string s_uc(arr); + std::basic_string s_uc(arr); ifs_uc >> s_uc; } - catch (bad_cast& obj) + catch (std::bad_cast& obj) { } - catch (exception& obj) + catch (std::exception& obj) { test = false; } VERIFY( test ); diff --git a/libstdc++-v3/testsuite/27_io/basic_istream/sentry/char/3983-sstream.cc b/libstdc++-v3/testsuite/27_io/basic_istream/sentry/char/3983-sstream.cc index 77bf598ec89..0ae9c807770 100644 --- a/libstdc++-v3/testsuite/27_io/basic_istream/sentry/char/3983-sstream.cc +++ b/libstdc++-v3/testsuite/27_io/basic_istream/sentry/char/3983-sstream.cc @@ -124,11 +124,10 @@ namespace std // Sentry uses locale info, so have to try one formatted input/output. void test03() { - using namespace std; bool test __attribute__((unused)) = true; // input streams - basic_istringstream iss_uc; + std::basic_istringstream iss_uc; unsigned char arr[6] = { 'a', 'b', 'c', 'd', 'e' }; try @@ -136,37 +135,37 @@ void test03() int i; iss_uc >> i; } - catch (bad_cast& obj) + catch (std::bad_cast& obj) { } - catch (exception& obj) + catch (std::exception& obj) { test = false; } try { iss_uc >> arr; } - catch (bad_cast& obj) + catch (std::bad_cast& obj) { } - catch (exception& obj) + catch (std::exception& obj) { test = false; } try { - iss_uc >> ws; + iss_uc >> std::ws; } - catch (bad_cast& obj) + catch (std::bad_cast& obj) { } - catch (exception& obj) + catch (std::exception& obj) { test = false; } try { - basic_string s_uc(arr); + std::basic_string s_uc(arr); iss_uc >> s_uc; } - catch (bad_cast& obj) + catch (std::bad_cast& obj) { } - catch (exception& obj) + catch (std::exception& obj) { test = false; } VERIFY( test ); diff --git a/libstdc++-v3/testsuite/27_io/basic_ostream/sentry/char/3983-fstream.cc b/libstdc++-v3/testsuite/27_io/basic_ostream/sentry/char/3983-fstream.cc index e3af42e3b62..c37c0048449 100644 --- a/libstdc++-v3/testsuite/27_io/basic_ostream/sentry/char/3983-fstream.cc +++ b/libstdc++-v3/testsuite/27_io/basic_ostream/sentry/char/3983-fstream.cc @@ -124,22 +124,19 @@ namespace std // Sentry uses locale info, so have to try one formatted input/output. void test03() { - using namespace std; bool test __attribute__((unused)) = true; // output streams - basic_ofstream ofs_uc; - + std::basic_ofstream ofs_uc; try { bool b = true; ofs_uc << b; } - catch (bad_cast& obj) + catch (std::bad_cast& obj) { } - catch (exception& obj) - { test = false; } - + catch (std::exception& obj) + { test = false; } VERIFY( test ); } diff --git a/libstdc++-v3/testsuite/27_io/basic_ostream/sentry/char/3983-sstream.cc b/libstdc++-v3/testsuite/27_io/basic_ostream/sentry/char/3983-sstream.cc index fe1a9473c2c..5ace23211d1 100644 --- a/libstdc++-v3/testsuite/27_io/basic_ostream/sentry/char/3983-sstream.cc +++ b/libstdc++-v3/testsuite/27_io/basic_ostream/sentry/char/3983-sstream.cc @@ -124,22 +124,19 @@ namespace std // Sentry uses locale info, so have to try one formatted input/output. void test03() { - using namespace std; bool test __attribute__((unused)) = true; // output streams - basic_ostringstream oss_uc; - + std::basic_ostringstream oss_uc; try { bool b = true; oss_uc << b; } - catch (bad_cast& obj) + catch (std::bad_cast& obj) { } - catch (exception& obj) - { test = false; } - + catch (std::exception& obj) + { test = false; } VERIFY( test ); } -- 2.30.2