diff options
author | paolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-02-03 23:44:53 +0000 |
---|---|---|
committer | paolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-02-03 23:44:53 +0000 |
commit | b1a09c64092cf86c74878feeb344358d29f4e337 (patch) | |
tree | e57495d04f52ab34d745a83ce9b9254363ad51c3 /libstdc++-v3/src | |
parent | e95b8b7e115dc0ae6b32abf95fa1099b74154a5b (diff) | |
download | gcc-b1a09c64092cf86c74878feeb344358d29f4e337.tar.gz |
2009-02-03 Paolo Carlini <paolo.carlini@oracle.com>
PR libstdc++/25191
* libsupc++/exception_defines.h: Depending on __EXCEPTIONS,
deal consistently with __try and __catch too.
* src/localename.cc: Replace try -> __try, catch -> __catch.
* src/ios.cc: Likewise.
* src/locale.cc: Likewise.
* src/istream.cc: Likewise.
* src/thread.cc: Likewise.
* src/compatibility.cc: Likewise.
* src/bitmap_allocator.cc: Likewise.
* src/ios_init.cc: Likewise.
* include/debug/deque: Likewise.
* include/debug/list: Likewise.
* include/tr1_impl/hashtable: Likewise.
* include/std/bitset: Likewise.
* include/ext/pb_ds/detail/resize_policy/
hash_load_check_resize_trigger_imp.hpp: Likewise.
* include/ext/pb_ds/detail/resize_policy/
hash_standard_resize_policy_imp.hpp: Likewise.
* include/ext/pb_ds/detail/cc_hash_table_map_/
resize_fn_imps.hpp: Likewise.
* include/ext/pb_ds/detail/cc_hash_table_map_/
constructor_destructor_fn_imps.hpp: Likewise.
* include/ext/pb_ds/detail/pat_trie_/
split_join_branch_bag.hpp: Likewise.
* include/ext/pb_ds/detail/pat_trie_/
constructors_destructor_fn_imps.hpp: Likewise.
* include/ext/pb_ds/detail/bin_search_tree_/
constructors_destructor_fn_imps.hpp: Likewise.
* include/ext/pb_ds/detail/gp_hash_table_map_/
resize_fn_imps.hpp: Likewise.
* include/ext/pb_ds/detail/gp_hash_table_map_/
constructor_destructor_fn_imps.hpp: Likewise.
* include/ext/pb_ds/detail/binary_heap_/
constructors_destructor_fn_imps.hpp: Likewise.
* include/ext/pb_ds/detail/binary_heap_/
erase_fn_imps.hpp: Likewise.
* include/ext/pb_ds/detail/binary_heap_/
split_join_fn_imps.hpp: Likewise.
* include/ext/pb_ds/detail/left_child_next_sibling_heap_/
constructors_destructor_fn_imps.hpp: Likewise.
* include/ext/pb_ds/detail/debug_map_base.hpp: Likewise.
* include/ext/pb_ds/detail/list_update_map_/
constructor_destructor_fn_imps.hpp: Likewise.
* include/ext/slist: Likewise.
* include/ext/memory: Likewise.
* include/ext/rc_string_base.h: Likewise.
* include/ext/ropeimpl.h: Likewise.
* include/ext/vstring.tcc: Likewise.
* include/ext/rope: Likewise.
* include/ext/sso_string_base.h: Likewise.
* include/bits/shared_ptr.h: Likewise.
* include/bits/stl_list.h: Likewise.
* include/bits/locale_classes.tcc: Likewise.
* include/bits/locale_facets.tcc: Likewise.
* include/bits/locale_classes.h: Likewise.
* include/bits/forward_list.h: Likewise.
* include/bits/stl_vector.h: Likewise.
* include/bits/stl_deque.h: Likewise.
* include/bits/istream.tcc: Likewise.
* include/bits/stl_uninitialized.h: Likewise.
* include/bits/ostream.tcc: Likewise.
* include/bits/vector.tcc: Likewise.
* include/bits/stl_tempbuf.h: Likewise.
* include/bits/deque.tcc: Likewise.
* include/bits/basic_string.tcc: Likewise.
* include/bits/ostream_insert.h: Likewise.
* include/bits/locale_facets_nonio.tcc: Likewise.
* include/bits/stl_tree.h: Likewise.
* include/bits/fstream.tcc: Likewise.
* include/tr1/shared_ptr.h: Likewise.
* include/tr1/hypergeometric.tcc: Likewise.
* include/backward/hashtable.h: Likewise.
* libsupc++/exception_ptr.h: Likewise.
* libsupc++/eh_personality.cc: Likewise.
* libsupc++/eh_call.cc: Likewise.
* config/locale/gnu/monetary_members.cc: Likewise.
* config/locale/gnu/time_members.h: Likewise.
* config/locale/generic/time_members.h: Likewise.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@143913 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++-v3/src')
-rw-r--r-- | libstdc++-v3/src/bitmap_allocator.cc | 7 | ||||
-rw-r--r-- | libstdc++-v3/src/compatibility.cc | 14 | ||||
-rw-r--r-- | libstdc++-v3/src/ios.cc | 11 | ||||
-rw-r--r-- | libstdc++-v3/src/ios_init.cc | 7 | ||||
-rw-r--r-- | libstdc++-v3/src/istream.cc | 51 | ||||
-rw-r--r-- | libstdc++-v3/src/locale.cc | 12 | ||||
-rw-r--r-- | libstdc++-v3/src/localename.cc | 10 | ||||
-rw-r--r-- | libstdc++-v3/src/thread.cc | 4 |
8 files changed, 60 insertions, 56 deletions
diff --git a/libstdc++-v3/src/bitmap_allocator.cc b/libstdc++-v3/src/bitmap_allocator.cc index 46b4d3c2bab..1d30b96a701 100644 --- a/libstdc++-v3/src/bitmap_allocator.cc +++ b/libstdc++-v3/src/bitmap_allocator.cc @@ -1,6 +1,7 @@ // Bitmap Allocator. Out of line function definitions. -*- C++ -*- -// Copyright (C) 2004, 2005, 2006 Free Software Foundation, Inc. +// Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 +// 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 @@ -75,12 +76,12 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) { size_t* __ret = 0; --__ctr; - try + __try { __ret = reinterpret_cast<size_t*> (::operator new(__sz + sizeof(size_t))); } - catch(...) + __catch(...) { this->_M_clear(); } diff --git a/libstdc++-v3/src/compatibility.cc b/libstdc++-v3/src/compatibility.cc index b4f942d3ce7..13f13cfcc98 100644 --- a/libstdc++-v3/src/compatibility.cc +++ b/libstdc++-v3/src/compatibility.cc @@ -1,6 +1,6 @@ // Compatibility symbols for previous versions -*- C++ -*- -// Copyright (C) 2005, 2006, 2009 +// Copyright (C) 2005, 2006, 2007, 2008, 2009 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free @@ -70,7 +70,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) if (__cerb && __n > 0) { ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); - try + __try { const int_type __eof = traits_type::eof(); __streambuf_type* __sb = this->rdbuf(); @@ -115,12 +115,12 @@ _GLIBCXX_BEGIN_NAMESPACE(std) if (traits_type::eq_int_type(__c, __eof)) __err |= ios_base::eofbit; } - catch(__cxxabiv1::__forced_unwind&) + __catch(__cxxabiv1::__forced_unwind&) { this->_M_setstate(ios_base::badbit); __throw_exception_again; } - catch(...) + __catch(...) { this->_M_setstate(ios_base::badbit); } if (__err) this->setstate(__err); @@ -142,7 +142,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) if (__cerb && __n > 0) { ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); - try + __try { const int_type __eof = traits_type::eof(); __streambuf_type* __sb = this->rdbuf(); @@ -186,12 +186,12 @@ _GLIBCXX_BEGIN_NAMESPACE(std) if (traits_type::eq_int_type(__c, __eof)) __err |= ios_base::eofbit; } - catch(__cxxabiv1::__forced_unwind&) + __catch(__cxxabiv1::__forced_unwind&) { this->_M_setstate(ios_base::badbit); __throw_exception_again; } - catch(...) + __catch(...) { this->_M_setstate(ios_base::badbit); } if (__err) this->setstate(__err); diff --git a/libstdc++-v3/src/ios.cc b/libstdc++-v3/src/ios.cc index fc140c0c3c3..ec07ef06888 100644 --- a/libstdc++-v3/src/ios.cc +++ b/libstdc++-v3/src/ios.cc @@ -1,6 +1,7 @@ // Iostreams base classes -*- C++ -*- -// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 +// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, +// 2006, 2007, 2008, 2009 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free @@ -125,9 +126,9 @@ _GLIBCXX_BEGIN_NAMESPACE(std) if (__ix < numeric_limits<int>::max()) { __newsize = __ix + 1; - try + __try { __words = new _Words[__newsize]; } - catch(...) + __catch(...) { _M_streambuf_state |= badbit; if (_M_streambuf_state & _M_exception) @@ -170,9 +171,9 @@ _GLIBCXX_BEGIN_NAMESPACE(std) _Callback_list* __p = _M_callbacks; while (__p) { - try + __try { (*__p->_M_fn) (__e, *this, __p->_M_index); } - catch(...) + __catch(...) { } __p = __p->_M_next; } diff --git a/libstdc++-v3/src/ios_init.cc b/libstdc++-v3/src/ios_init.cc index 50621aaeb5a..9db8f7d5634 100644 --- a/libstdc++-v3/src/ios_init.cc +++ b/libstdc++-v3/src/ios_init.cc @@ -1,6 +1,7 @@ // Iostreams base classes -*- C++ -*- -// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 +// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, +// 2006, 2007, 2008, 2009 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free @@ -129,7 +130,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) if (__gnu_cxx::__exchange_and_add_dispatch(&_S_refcount, -1) == 2) { // Catch any exceptions thrown by basic_ostream::flush() - try + __try { // Flush standard output streams as required by 27.4.2.1.6 cout.flush(); @@ -142,7 +143,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) wclog.flush(); #endif } - catch(...) + __catch(...) { } } } diff --git a/libstdc++-v3/src/istream.cc b/libstdc++-v3/src/istream.cc index 319202ee4c3..a5b7f605fe8 100644 --- a/libstdc++-v3/src/istream.cc +++ b/libstdc++-v3/src/istream.cc @@ -1,6 +1,7 @@ // Input streams -*- C++ -*- -// Copyright (C) 2004, 2005 Free Software Foundation, Inc. +// Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 +// 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 @@ -45,7 +46,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) sentry __cerb(*this, true); if (__cerb) { - try + __try { const int_type __idelim = traits_type::to_int_type(__delim); const int_type __eof = traits_type::eof(); @@ -91,12 +92,12 @@ _GLIBCXX_BEGIN_NAMESPACE(std) else __err |= ios_base::failbit; } - catch(__cxxabiv1::__forced_unwind&) + __catch(__cxxabiv1::__forced_unwind&) { this->_M_setstate(ios_base::badbit); __throw_exception_again; } - catch(...) + __catch(...) { this->_M_setstate(ios_base::badbit); } } // _GLIBCXX_RESOLVE_LIB_DEFECTS @@ -123,7 +124,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) if (__cerb && __n > 0) { ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); - try + __try { const char_type __cdelim = traits_type::to_char_type(__delim); const int_type __eof = traits_type::eof(); @@ -182,12 +183,12 @@ _GLIBCXX_BEGIN_NAMESPACE(std) __sb->sbumpc(); } } - catch(__cxxabiv1::__forced_unwind&) + __catch(__cxxabiv1::__forced_unwind&) { this->_M_setstate(ios_base::badbit); __throw_exception_again; } - catch(...) + __catch(...) { this->_M_setstate(ios_base::badbit); } if (__err) this->setstate(__err); @@ -211,7 +212,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) __istream_type::sentry __cerb(__in, false); if (__cerb) { - try + __try { // Figure out how many characters to extract. streamsize __num = __in.width(); @@ -261,12 +262,12 @@ _GLIBCXX_BEGIN_NAMESPACE(std) *__s = __char_type(); __in.width(0); } - catch(__cxxabiv1::__forced_unwind&) + __catch(__cxxabiv1::__forced_unwind&) { __in._M_setstate(ios_base::badbit); __throw_exception_again; } - catch(...) + __catch(...) { __in._M_setstate(ios_base::badbit); } } if (!__extracted) @@ -294,7 +295,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) __istream_type::sentry __cerb(__in, false); if (__cerb) { - try + __try { __str.erase(); const streamsize __w = __in.width(); @@ -336,12 +337,12 @@ _GLIBCXX_BEGIN_NAMESPACE(std) __err |= ios_base::eofbit; __in.width(0); } - catch(__cxxabiv1::__forced_unwind&) + __catch(__cxxabiv1::__forced_unwind&) { __in._M_setstate(ios_base::badbit); __throw_exception_again; } - catch(...) + __catch(...) { // _GLIBCXX_RESOLVE_LIB_DEFECTS // 91. Description of operator>> and getline() for string<> @@ -376,7 +377,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) __istream_type::sentry __cerb(__in, true); if (__cerb) { - try + __try { __str.erase(); const __int_type __idelim = __traits_type::to_int_type(__delim); @@ -421,12 +422,12 @@ _GLIBCXX_BEGIN_NAMESPACE(std) else __err |= ios_base::failbit; } - catch(__cxxabiv1::__forced_unwind&) + __catch(__cxxabiv1::__forced_unwind&) { __in._M_setstate(ios_base::badbit); __throw_exception_again; } - catch(...) + __catch(...) { // _GLIBCXX_RESOLVE_LIB_DEFECTS // 91. Description of operator>> and getline() for string<> @@ -452,7 +453,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) sentry __cerb(*this, true); if (__cerb) { - try + __try { const int_type __idelim = traits_type::to_int_type(__delim); const int_type __eof = traits_type::eof(); @@ -498,12 +499,12 @@ _GLIBCXX_BEGIN_NAMESPACE(std) else __err |= ios_base::failbit; } - catch(__cxxabiv1::__forced_unwind&) + __catch(__cxxabiv1::__forced_unwind&) { this->_M_setstate(ios_base::badbit); __throw_exception_again; } - catch(...) + __catch(...) { this->_M_setstate(ios_base::badbit); } } // _GLIBCXX_RESOLVE_LIB_DEFECTS @@ -530,7 +531,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) if (__cerb && __n > 0) { ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); - try + __try { const char_type __cdelim = traits_type::to_char_type(__delim); const int_type __eof = traits_type::eof(); @@ -589,12 +590,12 @@ _GLIBCXX_BEGIN_NAMESPACE(std) __sb->sbumpc(); } } - catch(__cxxabiv1::__forced_unwind&) + __catch(__cxxabiv1::__forced_unwind&) { this->_M_setstate(ios_base::badbit); __throw_exception_again; } - catch(...) + __catch(...) { this->_M_setstate(ios_base::badbit); } if (__err) this->setstate(__err); @@ -622,7 +623,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) __istream_type::sentry __cerb(__in, true); if (__cerb) { - try + __try { __str.erase(); const __int_type __idelim = __traits_type::to_int_type(__delim); @@ -667,12 +668,12 @@ _GLIBCXX_BEGIN_NAMESPACE(std) else __err |= ios_base::failbit; } - catch(__cxxabiv1::__forced_unwind&) + __catch(__cxxabiv1::__forced_unwind&) { __in._M_setstate(ios_base::badbit); __throw_exception_again; } - catch(...) + __catch(...) { // _GLIBCXX_RESOLVE_LIB_DEFECTS // 91. Description of operator>> and getline() for string<> diff --git a/libstdc++-v3/src/locale.cc b/libstdc++-v3/src/locale.cc index 7c30fc0bfe3..c87fcc93593 100644 --- a/libstdc++-v3/src/locale.cc +++ b/libstdc++-v3/src/locale.cc @@ -1,5 +1,5 @@ -// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, -// 2009 +// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, +// 2006, 2007, 2008, 2009 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free @@ -256,7 +256,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) : _M_refcount(__refs), _M_facets(0), _M_facets_size(__imp._M_facets_size), _M_caches(0), _M_names(0) { - try + __try { _M_facets = new const facet*[_M_facets_size]; for (size_t __i = 0; __i < _M_facets_size; ++__i) @@ -285,7 +285,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) std::memcpy(_M_names[__l], __imp._M_names[__l], __len); } } - catch(...) + __catch(...) { this->~_Impl(); __throw_exception_again; @@ -337,11 +337,11 @@ _GLIBCXX_BEGIN_NAMESPACE(std) // New cache array. const facet** __oldc = _M_caches; const facet** __newc; - try + __try { __newc = new const facet*[__new_size]; } - catch(...) + __catch(...) { delete [] __newf; __throw_exception_again; diff --git a/libstdc++-v3/src/localename.cc b/libstdc++-v3/src/localename.cc index 5f5ec5f62e9..875dbd4a3e1 100644 --- a/libstdc++-v3/src/localename.cc +++ b/libstdc++-v3/src/localename.cc @@ -1,5 +1,5 @@ // Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, -// 2006, 2007, 2008 +// 2006, 2007, 2008, 2009 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free @@ -166,9 +166,9 @@ _GLIBCXX_BEGIN_NAMESPACE(std) __cat = _S_normalize_category(__cat); _M_impl = new _Impl(*__base._M_impl, 1); - try + __try { _M_impl->_M_replace_categories(__add._M_impl, __cat); } - catch (...) + __catch (...) { _M_impl->_M_remove_reference(); __throw_exception_again; @@ -186,7 +186,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) __c_locale __cloc; locale::facet::_S_create_c_locale(__cloc, __s); - try + __try { _M_facets = new const facet*[_M_facets_size]; for (size_t __i = 0; __i < _M_facets_size; ++__i) @@ -254,7 +254,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) #endif locale::facet::_S_destroy_c_locale(__cloc); } - catch(...) + __catch(...) { locale::facet::_S_destroy_c_locale(__cloc); this->~_Impl(); diff --git a/libstdc++-v3/src/thread.cc b/libstdc++-v3/src/thread.cc index 357034f60b2..58e60cfe26b 100644 --- a/libstdc++-v3/src/thread.cc +++ b/libstdc++-v3/src/thread.cc @@ -44,11 +44,11 @@ namespace std __thread_data_ptr __local_thread_data; __local_thread_data.swap(__t->_M_this_ptr); - try + __try { __local_thread_data->_M_run(); } - catch(...) + __catch(...) { std::terminate(); } |