From: Paolo Carlini Date: Tue, 3 Feb 2009 23:44:53 +0000 (+0000) Subject: re PR libstdc++/25191 (exception_defines.h #defines try/catch) X-Git-Tag: releases/gcc-4.4.0~654 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=bc2631e0c645a95ba0e7bbc85c3ac3033ab49b3e;p=thirdparty%2Fgcc.git re PR libstdc++/25191 (exception_defines.h #defines try/catch) 2009-02-03 Paolo Carlini 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. From-SVN: r143913 --- diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index ec7aa47c84ca..b5d4d055dac9 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,85 @@ +2009-02-03 Paolo Carlini + + 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. + 2009-02-03 Johannes Singler * include/parallel/algorithmfwd.h: diff --git a/libstdc++-v3/config/locale/generic/time_members.h b/libstdc++-v3/config/locale/generic/time_members.h index 20c2b54058d0..538252ec199e 100644 --- a/libstdc++-v3/config/locale/generic/time_members.h +++ b/libstdc++-v3/config/locale/generic/time_members.h @@ -1,6 +1,6 @@ // std::time_get, std::time_put implementation, generic version -*- C++ -*- -// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007 +// Copyright (C) 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 @@ -73,9 +73,9 @@ _GLIBCXX_BEGIN_NAMESPACE(std) else _M_name_timepunct = _S_get_c_name(); - try + __try { _M_initialize_timepunct(__cloc); } - catch(...) + __catch(...) { if (_M_name_timepunct != _S_get_c_name()) delete [] _M_name_timepunct; diff --git a/libstdc++-v3/config/locale/gnu/monetary_members.cc b/libstdc++-v3/config/locale/gnu/monetary_members.cc index 1bf2487c86d7..a9f04cdffc3e 100644 --- a/libstdc++-v3/config/locale/gnu/monetary_members.cc +++ b/libstdc++-v3/config/locale/gnu/monetary_members.cc @@ -1,6 +1,6 @@ // std::moneypunct implementation details, GNU version -*- C++ -*- -// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 +// Copyright (C) 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 @@ -479,7 +479,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) wchar_t* __wcs_ps = 0; wchar_t* __wcs_ns = 0; const char __nposn = *(__nl_langinfo_l(__INT_N_SIGN_POSN, __cloc)); - try + __try { mbstate_t __state; size_t __len = strlen(__cpossign); @@ -524,7 +524,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) _M_data->_M_curr_symbol = L""; _M_data->_M_curr_symbol_size = wcslen(_M_data->_M_curr_symbol); } - catch(...) + __catch(...) { delete _M_data; _M_data = 0; @@ -647,7 +647,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) wchar_t* __wcs_ps = 0; wchar_t* __wcs_ns = 0; const char __nposn = *(__nl_langinfo_l(__N_SIGN_POSN, __cloc)); - try + __try { mbstate_t __state; size_t __len; @@ -693,7 +693,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) _M_data->_M_curr_symbol = L""; _M_data->_M_curr_symbol_size = wcslen(_M_data->_M_curr_symbol); } - catch(...) + __catch(...) { delete _M_data; _M_data = 0; diff --git a/libstdc++-v3/config/locale/gnu/time_members.h b/libstdc++-v3/config/locale/gnu/time_members.h index 3e5e0c3ed206..80e1e4f7dde1 100644 --- a/libstdc++-v3/config/locale/gnu/time_members.h +++ b/libstdc++-v3/config/locale/gnu/time_members.h @@ -1,6 +1,6 @@ // std::time_get, std::time_put implementation, GNU version -*- C++ -*- -// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007 +// Copyright (C) 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 @@ -70,9 +70,9 @@ _GLIBCXX_BEGIN_NAMESPACE(std) else _M_name_timepunct = _S_get_c_name(); - try + __try { _M_initialize_timepunct(__cloc); } - catch(...) + __catch(...) { if (_M_name_timepunct != _S_get_c_name()) delete [] _M_name_timepunct; diff --git a/libstdc++-v3/include/backward/hashtable.h b/libstdc++-v3/include/backward/hashtable.h index 7efb8ea5b128..62bc5bc51935 100644 --- a/libstdc++-v3/include/backward/hashtable.h +++ b/libstdc++-v3/include/backward/hashtable.h @@ -1,6 +1,6 @@ // Hashtable implementation used by containers -*- C++ -*- -// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007 +// Copyright (C) 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 @@ -603,12 +603,12 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) { _Node* __n = _M_get_node(); __n->_M_next = 0; - try + __try { this->get_allocator().construct(&__n->_M_val, __obj); return __n; } - catch(...) + __catch(...) { _M_put_node(__n); __throw_exception_again; @@ -995,7 +995,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) if (__n > __old_n) { _Vector_type __tmp(__n, (_Node*)(0), _M_buckets.get_allocator()); - try + __try { for (size_type __bucket = 0; __bucket < __old_n; ++__bucket) { @@ -1012,7 +1012,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) } _M_buckets.swap(__tmp); } - catch(...) + __catch(...) { for (size_type __bucket = 0; __bucket < __tmp.size(); ++__bucket) @@ -1098,7 +1098,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) _M_buckets.clear(); _M_buckets.reserve(__ht._M_buckets.size()); _M_buckets.insert(_M_buckets.end(), __ht._M_buckets.size(), (_Node*) 0); - try + __try { for (size_type __i = 0; __i < __ht._M_buckets.size(); ++__i) { const _Node* __cur = __ht._M_buckets[__i]; @@ -1118,7 +1118,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) } _M_num_elements = __ht._M_num_elements; } - catch(...) + __catch(...) { clear(); __throw_exception_again; diff --git a/libstdc++-v3/include/bits/basic_string.tcc b/libstdc++-v3/include/bits/basic_string.tcc index 3201e361830b..de41b8b7f00b 100644 --- a/libstdc++-v3/include/bits/basic_string.tcc +++ b/libstdc++-v3/include/bits/basic_string.tcc @@ -1,7 +1,7 @@ // Components for manipulating sequences of characters -*- C++ -*- // Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, -// 2006, 2007 +// 2006, 2007, 2008, 2009 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free @@ -97,7 +97,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) } _Rep* __r = _Rep::_S_create(__len, size_type(0), __a); _M_copy(__r->_M_refdata(), __buf, __len); - try + __try { while (__beg != __end) { @@ -113,7 +113,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) ++__beg; } } - catch(...) + __catch(...) { __r->_M_destroy(__a); __throw_exception_again; @@ -142,9 +142,9 @@ _GLIBCXX_BEGIN_NAMESPACE(std) __end)); // Check for out_of_range and length_error exceptions. _Rep* __r = _Rep::_S_create(__dnew, size_type(0), __a); - try + __try { _S_copy_chars(__r->_M_refdata(), __beg, __end); } - catch(...) + __catch(...) { __r->_M_destroy(__a); __throw_exception_again; @@ -992,7 +992,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) typename __istream_type::sentry __cerb(__in, false); if (__cerb) { - try + __try { // Avoid reallocation for common case. __str.erase(); @@ -1025,12 +1025,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<> @@ -1063,7 +1063,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) typename __istream_type::sentry __cerb(__in, true); if (__cerb) { - try + __try { __str.erase(); const __int_type __idelim = _Traits::to_int_type(__delim); @@ -1089,12 +1089,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/include/bits/deque.tcc b/libstdc++-v3/include/bits/deque.tcc index 9c1096f77bac..2a697686e9b1 100644 --- a/libstdc++-v3/include/bits/deque.tcc +++ b/libstdc++-v3/include/bits/deque.tcc @@ -1,6 +1,6 @@ // Deque implementation (out of line) -*- C++ -*- -// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 +// Copyright (C) 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 @@ -242,13 +242,13 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D) if (__pos._M_cur == this->_M_impl._M_start._M_cur) { iterator __new_start = _M_reserve_elements_at_front(__n); - try + __try { std::__uninitialized_fill_a(__new_start, this->_M_impl._M_start, __x, _M_get_Tp_allocator()); this->_M_impl._M_start = __new_start; } - catch(...) + __catch(...) { _M_destroy_nodes(__new_start._M_node, this->_M_impl._M_start._M_node); @@ -258,14 +258,14 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D) else if (__pos._M_cur == this->_M_impl._M_finish._M_cur) { iterator __new_finish = _M_reserve_elements_at_back(__n); - try + __try { std::__uninitialized_fill_a(this->_M_impl._M_finish, __new_finish, __x, _M_get_Tp_allocator()); this->_M_impl._M_finish = __new_finish; } - catch(...) + __catch(...) { _M_destroy_nodes(this->_M_impl._M_finish._M_node + 1, __new_finish._M_node + 1); @@ -282,7 +282,7 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D) _M_fill_initialize(const value_type& __value) { _Map_pointer __cur; - try + __try { for (__cur = this->_M_impl._M_start._M_node; __cur < this->_M_impl._M_finish._M_node; @@ -293,7 +293,7 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D) this->_M_impl._M_finish._M_cur, __value, _M_get_Tp_allocator()); } - catch(...) + __catch(...) { std::_Destroy(this->_M_impl._M_start, iterator(*__cur, __cur), _M_get_Tp_allocator()); @@ -309,12 +309,12 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D) std::input_iterator_tag) { this->_M_initialize_map(0); - try + __try { for (; __first != __last; ++__first) push_back(*__first); } - catch(...) + __catch(...) { clear(); __throw_exception_again; @@ -332,7 +332,7 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D) this->_M_initialize_map(__n); _Map_pointer __cur_node; - try + __try { for (__cur_node = this->_M_impl._M_start._M_node; __cur_node < this->_M_impl._M_finish._M_node; @@ -348,7 +348,7 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D) this->_M_impl._M_finish._M_first, _M_get_Tp_allocator()); } - catch(...) + __catch(...) { std::_Destroy(this->_M_impl._M_start, iterator(*__cur_node, __cur_node), @@ -372,7 +372,7 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D) { _M_reserve_map_at_back(); *(this->_M_impl._M_finish._M_node + 1) = this->_M_allocate_node(); - try + __try { #ifdef __GXX_EXPERIMENTAL_CXX0X__ this->_M_impl.construct(this->_M_impl._M_finish._M_cur, @@ -384,7 +384,7 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D) + 1); this->_M_impl._M_finish._M_cur = this->_M_impl._M_finish._M_first; } - catch(...) + __catch(...) { _M_deallocate_node(*(this->_M_impl._M_finish._M_node + 1)); __throw_exception_again; @@ -406,7 +406,7 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D) { _M_reserve_map_at_front(); *(this->_M_impl._M_start._M_node - 1) = this->_M_allocate_node(); - try + __try { this->_M_impl._M_start._M_set_node(this->_M_impl._M_start._M_node - 1); @@ -418,7 +418,7 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D) this->_M_impl.construct(this->_M_impl._M_start._M_cur, __t); #endif } - catch(...) + __catch(...) { ++this->_M_impl._M_start; _M_deallocate_node(*(this->_M_impl._M_start._M_node - 1)); @@ -473,13 +473,13 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D) if (__pos._M_cur == this->_M_impl._M_start._M_cur) { iterator __new_start = _M_reserve_elements_at_front(__n); - try + __try { std::__uninitialized_copy_a(__first, __last, __new_start, _M_get_Tp_allocator()); this->_M_impl._M_start = __new_start; } - catch(...) + __catch(...) { _M_destroy_nodes(__new_start._M_node, this->_M_impl._M_start._M_node); @@ -489,14 +489,14 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D) else if (__pos._M_cur == this->_M_impl._M_finish._M_cur) { iterator __new_finish = _M_reserve_elements_at_back(__n); - try + __try { std::__uninitialized_copy_a(__first, __last, this->_M_impl._M_finish, _M_get_Tp_allocator()); this->_M_impl._M_finish = __new_finish; } - catch(...) + __catch(...) { _M_destroy_nodes(this->_M_impl._M_finish._M_node + 1, __new_finish._M_node + 1); @@ -562,7 +562,7 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D) iterator __new_start = _M_reserve_elements_at_front(__n); iterator __old_start = this->_M_impl._M_start; __pos = this->_M_impl._M_start + __elems_before; - try + __try { if (__elems_before >= difference_type(__n)) { @@ -586,7 +586,7 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D) std::fill(__old_start, __pos, __x_copy); } } - catch(...) + __catch(...) { _M_destroy_nodes(__new_start._M_node, this->_M_impl._M_start._M_node); @@ -600,7 +600,7 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D) const difference_type __elems_after = difference_type(__length) - __elems_before; __pos = this->_M_impl._M_finish - __elems_after; - try + __try { if (__elems_after > difference_type(__n)) { @@ -625,7 +625,7 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D) std::fill(__pos, __old_finish, __x_copy); } } - catch(...) + __catch(...) { _M_destroy_nodes(this->_M_impl._M_finish._M_node + 1, __new_finish._M_node + 1); @@ -649,7 +649,7 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D) iterator __new_start = _M_reserve_elements_at_front(__n); iterator __old_start = this->_M_impl._M_start; __pos = this->_M_impl._M_start + __elemsbefore; - try + __try { if (__elemsbefore >= difference_type(__n)) { @@ -674,7 +674,7 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D) std::copy(__mid, __last, __old_start); } } - catch(...) + __catch(...) { _M_destroy_nodes(__new_start._M_node, this->_M_impl._M_start._M_node); @@ -688,7 +688,7 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D) const difference_type __elemsafter = difference_type(__length) - __elemsbefore; __pos = this->_M_impl._M_finish - __elemsafter; - try + __try { if (__elemsafter > difference_type(__n)) { @@ -714,7 +714,7 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D) std::copy(__first, __mid, __pos); } } - catch(...) + __catch(...) { _M_destroy_nodes(this->_M_impl._M_finish._M_node + 1, __new_finish._M_node + 1); @@ -757,12 +757,12 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D) / _S_buffer_size()); _M_reserve_map_at_front(__new_nodes); size_type __i; - try + __try { for (__i = 1; __i <= __new_nodes; ++__i) *(this->_M_impl._M_start._M_node - __i) = this->_M_allocate_node(); } - catch(...) + __catch(...) { for (size_type __j = 1; __j < __i; ++__j) _M_deallocate_node(*(this->_M_impl._M_start._M_node - __j)); @@ -782,12 +782,12 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D) / _S_buffer_size()); _M_reserve_map_at_back(__new_nodes); size_type __i; - try + __try { for (__i = 1; __i <= __new_nodes; ++__i) *(this->_M_impl._M_finish._M_node + __i) = this->_M_allocate_node(); } - catch(...) + __catch(...) { for (size_type __j = 1; __j < __i; ++__j) _M_deallocate_node(*(this->_M_impl._M_finish._M_node + __j)); diff --git a/libstdc++-v3/include/bits/forward_list.h b/libstdc++-v3/include/bits/forward_list.h index e6a6a80d5134..78f098faacd6 100644 --- a/libstdc++-v3/include/bits/forward_list.h +++ b/libstdc++-v3/include/bits/forward_list.h @@ -366,13 +366,13 @@ _GLIBCXX_BEGIN_NAMESPACE(std) _M_create_node(_Args&&... __args) { typename _Node::_Pointer __node = this->_M_get_node(); - try + __try { _M_get_Node_allocator().construct(__node, std::forward<_Args>(__args)...); __node->_M_next = 0; } - catch(...) + __catch(...) { this->_M_put_node(__node); __throw_exception_again; diff --git a/libstdc++-v3/include/bits/fstream.tcc b/libstdc++-v3/include/bits/fstream.tcc index 69119dc6853e..f5de38c5d743 100644 --- a/libstdc++-v3/include/bits/fstream.tcc +++ b/libstdc++-v3/include/bits/fstream.tcc @@ -1,7 +1,7 @@ // File based streams -*- C++ -*- // Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, -// 2007 +// 2007, 2008, 2009 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free @@ -154,17 +154,17 @@ _GLIBCXX_BEGIN_NAMESPACE(std) } } __cs (this); - try + __try { if (!_M_terminate_output()) __testfail = true; } - catch(__cxxabiv1::__forced_unwind&) + __catch(__cxxabiv1::__forced_unwind&) { _M_file.close(); __throw_exception_again; } - catch(...) + __catch(...) { __testfail = true; } } diff --git a/libstdc++-v3/include/bits/istream.tcc b/libstdc++-v3/include/bits/istream.tcc index 440d234023e7..ca5e31446c93 100644 --- a/libstdc++-v3/include/bits/istream.tcc +++ b/libstdc++-v3/include/bits/istream.tcc @@ -1,7 +1,7 @@ // istream classes -*- C++ -*- // Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, -// 2006, 2007 +// 2006, 2007, 2008, 2009 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free @@ -95,17 +95,17 @@ _GLIBCXX_BEGIN_NAMESPACE(std) if (__cerb) { ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); - try + __try { const __num_get_type& __ng = __check_facet(this->_M_num_get); __ng.get(*this, 0, *this, __err, __v); } - 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); @@ -162,7 +162,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) sentry __cerb(*this, false); if (__cerb && __sbout) { - try + __try { bool __ineof; if (!__copy_streambufs_eof(this->rdbuf(), __sbout, __ineof)) @@ -170,12 +170,12 @@ _GLIBCXX_BEGIN_NAMESPACE(std) if (__ineof) __err |= ios_base::eofbit; } - catch(__cxxabiv1::__forced_unwind&) + __catch(__cxxabiv1::__forced_unwind&) { this->_M_setstate(ios_base::failbit); __throw_exception_again; } - catch(...) + __catch(...) { this->_M_setstate(ios_base::failbit); } } else if (!__sbout) @@ -197,7 +197,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) sentry __cerb(*this, true); if (__cerb) { - try + __try { __c = this->rdbuf()->sbumpc(); // 27.6.1.1 paragraph 3 @@ -206,12 +206,12 @@ _GLIBCXX_BEGIN_NAMESPACE(std) else __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 (!_M_gcount) @@ -231,7 +231,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) sentry __cerb(*this, true); if (__cerb) { - try + __try { const int_type __cb = this->rdbuf()->sbumpc(); // 27.6.1.1 paragraph 3 @@ -243,12 +243,12 @@ _GLIBCXX_BEGIN_NAMESPACE(std) else __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 (!_M_gcount) @@ -268,7 +268,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(); @@ -286,12 +286,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); } } // _GLIBCXX_RESOLVE_LIB_DEFECTS @@ -315,7 +315,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(); @@ -334,12 +334,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 (!_M_gcount) @@ -359,7 +359,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(); @@ -387,12 +387,12 @@ _GLIBCXX_BEGIN_NAMESPACE(std) __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 @@ -419,7 +419,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) if (__cerb) { ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); - try + __try { const int_type __eof = traits_type::eof(); __streambuf_type* __sb = this->rdbuf(); @@ -429,12 +429,12 @@ _GLIBCXX_BEGIN_NAMESPACE(std) else _M_gcount = 1; } - 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); @@ -452,7 +452,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(); @@ -491,12 +491,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); @@ -514,7 +514,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(); @@ -556,12 +556,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); @@ -580,18 +580,18 @@ _GLIBCXX_BEGIN_NAMESPACE(std) if (__cerb) { ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); - try + __try { __c = this->rdbuf()->sgetc(); if (traits_type::eq_int_type(__c, traits_type::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); @@ -609,18 +609,18 @@ _GLIBCXX_BEGIN_NAMESPACE(std) if (__cerb) { ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); - try + __try { _M_gcount = this->rdbuf()->sgetn(__s, __n); if (_M_gcount != __n) __err |= (ios_base::eofbit | 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); } if (__err) this->setstate(__err); @@ -638,7 +638,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) if (__cerb) { ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); - try + __try { // Cannot compare int_type with streamsize generically. const streamsize __num = this->rdbuf()->in_avail(); @@ -647,12 +647,12 @@ _GLIBCXX_BEGIN_NAMESPACE(std) else if (__num == -1) __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); @@ -672,7 +672,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) if (__cerb) { ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); - try + __try { const int_type __eof = traits_type::eof(); __streambuf_type* __sb = this->rdbuf(); @@ -680,12 +680,12 @@ _GLIBCXX_BEGIN_NAMESPACE(std) || traits_type::eq_int_type(__sb->sputbackc(__c), __eof)) __err |= ios_base::badbit; } - 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); @@ -705,7 +705,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) if (__cerb) { ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); - try + __try { const int_type __eof = traits_type::eof(); __streambuf_type* __sb = this->rdbuf(); @@ -713,12 +713,12 @@ _GLIBCXX_BEGIN_NAMESPACE(std) || traits_type::eq_int_type(__sb->sungetc(), __eof)) __err |= ios_base::badbit; } - 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); @@ -738,7 +738,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) if (__cerb) { ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); - try + __try { __streambuf_type* __sb = this->rdbuf(); if (__sb) @@ -749,12 +749,12 @@ _GLIBCXX_BEGIN_NAMESPACE(std) __ret = 0; } } - 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); @@ -770,18 +770,18 @@ _GLIBCXX_BEGIN_NAMESPACE(std) // _GLIBCXX_RESOLVE_LIB_DEFECTS // DR60. Do not change _M_gcount. pos_type __ret = pos_type(-1); - try + __try { if (!this->fail()) __ret = this->rdbuf()->pubseekoff(0, ios_base::cur, ios_base::in); } - 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); } return __ret; } @@ -794,7 +794,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) // _GLIBCXX_RESOLVE_LIB_DEFECTS // DR60. Do not change _M_gcount. ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); - try + __try { if (!this->fail()) { @@ -807,12 +807,12 @@ _GLIBCXX_BEGIN_NAMESPACE(std) __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); } if (__err) this->setstate(__err); @@ -827,7 +827,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) // _GLIBCXX_RESOLVE_LIB_DEFECTS // DR60. Do not change _M_gcount. ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); - try + __try { if (!this->fail()) { @@ -840,12 +840,12 @@ _GLIBCXX_BEGIN_NAMESPACE(std) __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); } if (__err) this->setstate(__err); @@ -864,7 +864,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) if (__cerb) { ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); - try + __try { const __int_type __cb = __in.rdbuf()->sbumpc(); if (!_Traits::eq_int_type(__cb, _Traits::eof())) @@ -872,12 +872,12 @@ _GLIBCXX_BEGIN_NAMESPACE(std) else __err |= (ios_base::eofbit | ios_base::failbit); } - 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 (__err) __in.setstate(__err); @@ -900,7 +900,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) typename __istream_type::sentry __cerb(__in, false); if (__cerb) { - try + __try { // Figure out how many characters to extract. streamsize __num = __in.width(); @@ -930,12 +930,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) diff --git a/libstdc++-v3/include/bits/locale_classes.h b/libstdc++-v3/include/bits/locale_classes.h index cab5812160ec..ad7b456c26d3 100644 --- a/libstdc++-v3/include/bits/locale_classes.h +++ b/libstdc++-v3/include/bits/locale_classes.h @@ -1,7 +1,7 @@ // Locale support -*- C++ -*- // 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 @@ -404,9 +404,9 @@ _GLIBCXX_BEGIN_NAMESPACE(std) { if (__gnu_cxx::__exchange_and_add_dispatch(&_M_refcount, -1) == 1) { - try + __try { delete this; } - catch(...) + __catch(...) { } } } @@ -509,9 +509,9 @@ _GLIBCXX_BEGIN_NAMESPACE(std) { if (__gnu_cxx::__exchange_and_add_dispatch(&_M_refcount, -1) == 1) { - try + __try { delete this; } - catch(...) + __catch(...) { } } } diff --git a/libstdc++-v3/include/bits/locale_classes.tcc b/libstdc++-v3/include/bits/locale_classes.tcc index 551fc90d3b6d..bc2daeb2b153 100644 --- a/libstdc++-v3/include/bits/locale_classes.tcc +++ b/libstdc++-v3/include/bits/locale_classes.tcc @@ -1,6 +1,6 @@ // Locale support -*- C++ -*- -// Copyright (C) 2007, 2008 Free Software Foundation, Inc. +// Copyright (C) 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 @@ -49,9 +49,9 @@ _GLIBCXX_BEGIN_NAMESPACE(std) { _M_impl = new _Impl(*__other._M_impl, 1); - try + __try { _M_impl->_M_install_facet(&_Facet::id, __f); } - catch(...) + __catch(...) { _M_impl->_M_remove_reference(); __throw_exception_again; @@ -66,11 +66,11 @@ _GLIBCXX_BEGIN_NAMESPACE(std) combine(const locale& __other) const { _Impl* __tmp = new _Impl(*_M_impl, 1); - try + __try { __tmp->_M_replace_facet(__other._M_impl, &_Facet::id); } - catch(...) + __catch(...) { __tmp->_M_remove_reference(); __throw_exception_again; @@ -189,7 +189,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) _CharT* __c = new _CharT[__len]; - try + __try { // strxfrm stops when it sees a nul character so we break // the string into zero-terminated substrings and pass those @@ -217,7 +217,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) __ret.push_back(_CharT()); } } - catch(...) + __catch(...) { delete [] __c; __throw_exception_again; diff --git a/libstdc++-v3/include/bits/locale_facets.tcc b/libstdc++-v3/include/bits/locale_facets.tcc index 4ae827f4e999..779b4d505e14 100644 --- a/libstdc++-v3/include/bits/locale_facets.tcc +++ b/libstdc++-v3/include/bits/locale_facets.tcc @@ -1,7 +1,7 @@ // Locale support -*- C++ -*- // 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 @@ -62,12 +62,12 @@ _GLIBCXX_BEGIN_NAMESPACE(std) if (!__caches[__i]) { __numpunct_cache<_CharT>* __tmp = NULL; - try + __try { __tmp = new __numpunct_cache<_CharT>; __tmp->_M_cache(__loc); } - catch(...) + __catch(...) { delete __tmp; __throw_exception_again; diff --git a/libstdc++-v3/include/bits/locale_facets_nonio.tcc b/libstdc++-v3/include/bits/locale_facets_nonio.tcc index ba75d3a01bf5..9cc1b913d19c 100644 --- a/libstdc++-v3/include/bits/locale_facets_nonio.tcc +++ b/libstdc++-v3/include/bits/locale_facets_nonio.tcc @@ -1,6 +1,6 @@ // Locale support -*- C++ -*- -// Copyright (C) 2007, 2008 Free Software Foundation, Inc. +// Copyright (C) 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 @@ -50,12 +50,12 @@ _GLIBCXX_BEGIN_NAMESPACE(std) if (!__caches[__i]) { __moneypunct_cache<_CharT, _Intl>* __tmp = NULL; - try + __try { __tmp = new __moneypunct_cache<_CharT, _Intl>; __tmp->_M_cache(__loc); } - catch(...) + __catch(...) { delete __tmp; __throw_exception_again; diff --git a/libstdc++-v3/include/bits/ostream.tcc b/libstdc++-v3/include/bits/ostream.tcc index 06facc0360b0..bdc6c2861fa4 100644 --- a/libstdc++-v3/include/bits/ostream.tcc +++ b/libstdc++-v3/include/bits/ostream.tcc @@ -1,7 +1,7 @@ // ostream classes -*- C++ -*- // Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, -// 2006, 2007 +// 2006, 2007, 2008, 2009 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free @@ -72,18 +72,18 @@ _GLIBCXX_BEGIN_NAMESPACE(std) if (__cerb) { ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); - try + __try { const __num_put_type& __np = __check_facet(this->_M_num_put); if (__np.put(*this, *this, this->fill(), __v).failed()) __err |= ios_base::badbit; } - 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); @@ -128,17 +128,17 @@ _GLIBCXX_BEGIN_NAMESPACE(std) sentry __cerb(*this); if (__cerb && __sbin) { - try + __try { if (!__copy_streambufs(__sbin, this->rdbuf())) __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::failbit); } } else if (!__sbin) @@ -163,18 +163,18 @@ _GLIBCXX_BEGIN_NAMESPACE(std) if (__cerb) { ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); - try + __try { const int_type __put = this->rdbuf()->sputc(__c); if (traits_type::eq_int_type(__put, traits_type::eof())) __err |= ios_base::badbit; } - 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); @@ -197,14 +197,14 @@ _GLIBCXX_BEGIN_NAMESPACE(std) sentry __cerb(*this); if (__cerb) { - try + __try { _M_write(__s, __n); } - 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); } } return *this; @@ -219,17 +219,17 @@ _GLIBCXX_BEGIN_NAMESPACE(std) // DR 60. What is a formatted input function? // basic_ostream::flush() is *not* an unformatted output function. ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); - try + __try { if (this->rdbuf() && this->rdbuf()->pubsync() == -1) __err |= ios_base::badbit; } - 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); @@ -242,17 +242,17 @@ _GLIBCXX_BEGIN_NAMESPACE(std) tellp() { pos_type __ret = pos_type(-1); - try + __try { if (!this->fail()) __ret = this->rdbuf()->pubseekoff(0, ios_base::cur, ios_base::out); } - 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); } return __ret; } @@ -263,7 +263,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) seekp(pos_type __pos) { ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); - try + __try { if (!this->fail()) { @@ -277,12 +277,12 @@ _GLIBCXX_BEGIN_NAMESPACE(std) __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); } if (__err) this->setstate(__err); @@ -295,7 +295,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) seekp(off_type __off, ios_base::seekdir __dir) { ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); - try + __try { if (!this->fail()) { @@ -309,12 +309,12 @@ _GLIBCXX_BEGIN_NAMESPACE(std) __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); } if (__err) this->setstate(__err); @@ -332,7 +332,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) // _GLIBCXX_RESOLVE_LIB_DEFECTS // 167. Improper use of traits_type::length() const size_t __clen = char_traits::length(__s); - try + __try { struct __ptr_guard { @@ -347,12 +347,12 @@ _GLIBCXX_BEGIN_NAMESPACE(std) __ws[__i] = __out.widen(__s[__i]); __ostream_insert(__out, __ws, __clen); } - catch(__cxxabiv1::__forced_unwind&) + __catch(__cxxabiv1::__forced_unwind&) { __out._M_setstate(ios_base::badbit); __throw_exception_again; } - catch(...) + __catch(...) { __out._M_setstate(ios_base::badbit); } } return __out; diff --git a/libstdc++-v3/include/bits/ostream_insert.h b/libstdc++-v3/include/bits/ostream_insert.h index 5f63263c297b..170c6bc3a3e2 100644 --- a/libstdc++-v3/include/bits/ostream_insert.h +++ b/libstdc++-v3/include/bits/ostream_insert.h @@ -1,6 +1,6 @@ // Helpers for ostream inserters -*- C++ -*- -// Copyright (C) 2007 Free Software Foundation, Inc. +// Copyright (C) 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 @@ -85,7 +85,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) typename __ostream_type::sentry __cerb(__out); if (__cerb) { - try + __try { const streamsize __w = __out.width(); if (__w > __n) @@ -104,12 +104,12 @@ _GLIBCXX_BEGIN_NAMESPACE(std) __ostream_write(__out, __s, __n); __out.width(0); } - catch(__cxxabiv1::__forced_unwind&) + __catch(__cxxabiv1::__forced_unwind&) { __out._M_setstate(__ios_base::badbit); __throw_exception_again; } - catch(...) + __catch(...) { __out._M_setstate(__ios_base::badbit); } } return __out; diff --git a/libstdc++-v3/include/bits/shared_ptr.h b/libstdc++-v3/include/bits/shared_ptr.h index c017dcf6fc6e..e4758dcdf38e 100644 --- a/libstdc++-v3/include/bits/shared_ptr.h +++ b/libstdc++-v3/include/bits/shared_ptr.h @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2007, 2008 Free Software Foundation, Inc. +// Copyright (C) 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 @@ -222,11 +222,11 @@ namespace std template __shared_count(_Ptr __p) : _M_pi(0) { - try + __try { _M_pi = new _Sp_counted_ptr<_Ptr, _Lp>(__p); } - catch(...) + __catch(...) { delete __p; __throw_exception_again; @@ -241,12 +241,12 @@ namespace std typedef _Sp_counted_deleter<_Ptr, _Deleter, _Alloc, _Lp> _Sp_cd_type; typedef std::allocator<_Sp_cd_type> _Alloc2; _Alloc2 __a2; - try + __try { _M_pi = __a2.allocate(1); ::new(static_cast(_M_pi)) _Sp_cd_type(__p, __d); } - catch(...) + __catch(...) { __d(__p); // Call _Deleter on __p. if (_M_pi) @@ -261,12 +261,12 @@ namespace std typedef _Sp_counted_deleter<_Ptr, _Deleter, _Alloc, _Lp> _Sp_cd_type; typedef typename _Alloc::template rebind<_Sp_cd_type>::other _Alloc2; _Alloc2 __a2(__a); - try + __try { _M_pi = __a2.allocate(1); ::new(static_cast(_M_pi)) _Sp_cd_type(__p, __d, __a); } - catch(...) + __catch(...) { __d(__p); // Call _Deleter on __p. if (_M_pi) @@ -282,13 +282,13 @@ namespace std typedef _Sp_counted_ptr_inplace<_Tp, _Alloc, _Lp> _Sp_cp_type; typedef typename _Alloc::template rebind<_Sp_cp_type>::other _Alloc2; _Alloc2 __a2(__a); - try + __try { _M_pi = __a2.allocate(1); ::new(static_cast(_M_pi)) _Sp_cp_type(__a, std::forward<_Args>(__args)...); } - catch(...) + __catch(...) { if (_M_pi) __a2.deallocate(static_cast<_Sp_cp_type*>(_M_pi), 1); @@ -1074,11 +1074,11 @@ namespace std if (expired()) return __shared_ptr(); - try + __try { return __shared_ptr(*this); } - catch(const bad_weak_ptr&) + __catch(const bad_weak_ptr&) { // Q: How can we get here? // A: Another thread may have invalidated r after the @@ -1447,11 +1447,11 @@ namespace std if (this->expired()) return shared_ptr<_Tp>(); - try + __try { return shared_ptr<_Tp>(*this); } - catch(const bad_weak_ptr&) + __catch(const bad_weak_ptr&) { return shared_ptr<_Tp>(); } diff --git a/libstdc++-v3/include/bits/stl_deque.h b/libstdc++-v3/include/bits/stl_deque.h index 070fc0789099..ec9a727b0f3e 100644 --- a/libstdc++-v3/include/bits/stl_deque.h +++ b/libstdc++-v3/include/bits/stl_deque.h @@ -1,6 +1,6 @@ // Deque implementation -*- C++ -*- -// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 +// Copyright (C) 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 @@ -513,9 +513,9 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D) + (this->_M_impl._M_map_size - __num_nodes) / 2); _Tp** __nfinish = __nstart + __num_nodes; - try + __try { _M_create_nodes(__nstart, __nfinish); } - catch(...) + __catch(...) { _M_deallocate_map(this->_M_impl._M_map, this->_M_impl._M_map_size); this->_M_impl._M_map = 0; @@ -537,12 +537,12 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D) _M_create_nodes(_Tp** __nstart, _Tp** __nfinish) { _Tp** __cur; - try + __try { for (__cur = __nstart; __cur < __nfinish; ++__cur) *__cur = this->_M_allocate_node(); } - catch(...) + __catch(...) { _M_destroy_nodes(__nstart, __cur); __throw_exception_again; diff --git a/libstdc++-v3/include/bits/stl_list.h b/libstdc++-v3/include/bits/stl_list.h index 18f6f0276810..d38fffe1b333 100644 --- a/libstdc++-v3/include/bits/stl_list.h +++ b/libstdc++-v3/include/bits/stl_list.h @@ -1,6 +1,6 @@ // List implementation -*- C++ -*- -// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 +// Copyright (C) 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 @@ -465,11 +465,11 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D) _M_create_node(const value_type& __x) { _Node* __p = this->_M_get_node(); - try + __try { _M_get_Tp_allocator().construct(&__p->_M_data, __x); } - catch(...) + __catch(...) { _M_put_node(__p); __throw_exception_again; @@ -482,12 +482,12 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D) _M_create_node(_Args&&... __args) { _Node* __p = this->_M_get_node(); - try + __try { _M_get_Node_allocator().construct(__p, std::forward<_Args>(__args)...); } - catch(...) + __catch(...) { _M_put_node(__p); __throw_exception_again; diff --git a/libstdc++-v3/include/bits/stl_tempbuf.h b/libstdc++-v3/include/bits/stl_tempbuf.h index e9ba10c7e8a8..9e98fcd7bdc5 100644 --- a/libstdc++-v3/include/bits/stl_tempbuf.h +++ b/libstdc++-v3/include/bits/stl_tempbuf.h @@ -1,6 +1,6 @@ // Temporary buffer implementation -*- C++ -*- -// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 +// Copyright (C) 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 @@ -187,7 +187,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) : _M_original_len(std::distance(__first, __last)), _M_len(0), _M_buffer(0) { - try + __try { std::pair __p(std::get_temporary_buffer< value_type>(_M_original_len)); @@ -196,7 +196,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) if (!__is_pod(_Tp) && _M_len > 0) std::uninitialized_fill_n(_M_buffer, _M_len, *__first); } - catch(...) + __catch(...) { std::return_temporary_buffer(_M_buffer); _M_buffer = 0; diff --git a/libstdc++-v3/include/bits/stl_tree.h b/libstdc++-v3/include/bits/stl_tree.h index c80dbefc3188..125b66611207 100644 --- a/libstdc++-v3/include/bits/stl_tree.h +++ b/libstdc++-v3/include/bits/stl_tree.h @@ -1,6 +1,6 @@ // RB tree implementation -*- C++ -*- -// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 +// Copyright (C) 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 @@ -372,9 +372,9 @@ _GLIBCXX_BEGIN_NAMESPACE(std) _M_create_node(const value_type& __x) { _Link_type __tmp = _M_get_node(); - try + __try { get_allocator().construct(&__tmp->_M_value_field, __x); } - catch(...) + __catch(...) { _M_put_node(__tmp); __throw_exception_again; @@ -394,12 +394,12 @@ _GLIBCXX_BEGIN_NAMESPACE(std) _M_create_node(_Args&&... __args) { _Link_type __tmp = _M_get_node(); - try + __try { _M_get_Node_allocator().construct(__tmp, std::forward<_Args>(__args)...); } - catch(...) + __catch(...) { _M_put_node(__tmp); __throw_exception_again; @@ -937,7 +937,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) _Link_type __top = _M_clone_node(__x); __top->_M_parent = __p; - try + __try { if (__x->_M_right) __top->_M_right = _M_copy(_S_right(__x), __top); @@ -955,7 +955,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) __x = _S_left(__x); } } - catch(...) + __catch(...) { _M_erase(__top); __throw_exception_again; diff --git a/libstdc++-v3/include/bits/stl_uninitialized.h b/libstdc++-v3/include/bits/stl_uninitialized.h index af51264a2490..a9936cfecc35 100644 --- a/libstdc++-v3/include/bits/stl_uninitialized.h +++ b/libstdc++-v3/include/bits/stl_uninitialized.h @@ -1,6 +1,6 @@ // Raw memory manipulators -*- C++ -*- -// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 +// Copyright (C) 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 @@ -73,14 +73,14 @@ _GLIBCXX_BEGIN_NAMESPACE(std) _ForwardIterator __result) { _ForwardIterator __cur = __result; - try + __try { for (; __first != __last; ++__first, ++__cur) ::new(static_cast(&*__cur)) typename iterator_traits<_ForwardIterator>::value_type(*__first); return __cur; } - catch(...) + __catch(...) { std::_Destroy(__result, __cur); __throw_exception_again; @@ -132,12 +132,12 @@ _GLIBCXX_BEGIN_NAMESPACE(std) _ForwardIterator __last, const _Tp& __x) { _ForwardIterator __cur = __first; - try + __try { for (; __cur != __last; ++__cur) std::_Construct(&*__cur, __x); } - catch(...) + __catch(...) { std::_Destroy(__first, __cur); __throw_exception_again; @@ -186,12 +186,12 @@ _GLIBCXX_BEGIN_NAMESPACE(std) const _Tp& __x) { _ForwardIterator __cur = __first; - try + __try { for (; __n > 0; --__n, ++__cur) std::_Construct(&*__cur, __x); } - catch(...) + __catch(...) { std::_Destroy(__first, __cur); __throw_exception_again; @@ -242,13 +242,13 @@ _GLIBCXX_BEGIN_NAMESPACE(std) _ForwardIterator __result, _Allocator& __alloc) { _ForwardIterator __cur = __result; - try + __try { for (; __first != __last; ++__first, ++__cur) __alloc.construct(&*__cur, *__first); return __cur; } - catch(...) + __catch(...) { std::_Destroy(__result, __cur, __alloc); __throw_exception_again; @@ -278,12 +278,12 @@ _GLIBCXX_BEGIN_NAMESPACE(std) const _Tp& __x, _Allocator& __alloc) { _ForwardIterator __cur = __first; - try + __try { for (; __cur != __last; ++__cur) __alloc.construct(&*__cur, __x); } - catch(...) + __catch(...) { std::_Destroy(__first, __cur, __alloc); __throw_exception_again; @@ -303,12 +303,12 @@ _GLIBCXX_BEGIN_NAMESPACE(std) const _Tp& __x, _Allocator& __alloc) { _ForwardIterator __cur = __first; - try + __try { for (; __n > 0; --__n, ++__cur) __alloc.construct(&*__cur, __x); } - catch(...) + __catch(...) { std::_Destroy(__first, __cur, __alloc); __throw_exception_again; @@ -345,11 +345,11 @@ _GLIBCXX_BEGIN_NAMESPACE(std) _ForwardIterator __mid = std::__uninitialized_copy_a(__first1, __last1, __result, __alloc); - try + __try { return std::__uninitialized_move_a(__first2, __last2, __mid, __alloc); } - catch(...) + __catch(...) { std::_Destroy(__result, __mid, __alloc); __throw_exception_again; @@ -373,11 +373,11 @@ _GLIBCXX_BEGIN_NAMESPACE(std) _ForwardIterator __mid = std::__uninitialized_move_a(__first1, __last1, __result, __alloc); - try + __try { return std::__uninitialized_copy_a(__first2, __last2, __mid, __alloc); } - catch(...) + __catch(...) { std::_Destroy(__result, __mid, __alloc); __throw_exception_again; @@ -395,11 +395,11 @@ _GLIBCXX_BEGIN_NAMESPACE(std) _InputIterator __last, _Allocator& __alloc) { std::__uninitialized_fill_a(__result, __mid, __x, __alloc); - try + __try { return std::__uninitialized_move_a(__first, __last, __mid, __alloc); } - catch(...) + __catch(...) { std::_Destroy(__result, __mid, __alloc); __throw_exception_again; @@ -420,11 +420,11 @@ _GLIBCXX_BEGIN_NAMESPACE(std) _ForwardIterator __mid2 = std::__uninitialized_move_a(__first1, __last1, __first2, __alloc); - try + __try { std::__uninitialized_fill_a(__mid2, __last2, __x, __alloc); } - catch(...) + __catch(...) { std::_Destroy(__first2, __mid2, __alloc); __throw_exception_again; @@ -439,14 +439,14 @@ _GLIBCXX_BEGIN_NAMESPACE(std) _ForwardIterator __result, input_iterator_tag) { _ForwardIterator __cur = __result; - try + __try { for (; __n > 0; --__n, ++__first, ++__cur) ::new(static_cast(&*__cur)) typename iterator_traits<_ForwardIterator>::value_type(*__first); return __cur; } - catch(...) + __catch(...) { std::_Destroy(__result, __cur); __throw_exception_again; diff --git a/libstdc++-v3/include/bits/stl_vector.h b/libstdc++-v3/include/bits/stl_vector.h index 37bd21803d4d..e6a42c6835c7 100644 --- a/libstdc++-v3/include/bits/stl_vector.h +++ b/libstdc++-v3/include/bits/stl_vector.h @@ -1,6 +1,6 @@ // Vector implementation -*- C++ -*- -// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 +// Copyright (C) 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 @@ -968,13 +968,13 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D) _ForwardIterator __first, _ForwardIterator __last) { pointer __result = this->_M_allocate(__n); - try + __try { std::__uninitialized_copy_a(__first, __last, __result, _M_get_Tp_allocator()); return __result; } - catch(...) + __catch(...) { _M_deallocate(__result, __n); __throw_exception_again; diff --git a/libstdc++-v3/include/bits/vector.tcc b/libstdc++-v3/include/bits/vector.tcc index 04f76ca2c2c7..39b7951bff56 100644 --- a/libstdc++-v3/include/bits/vector.tcc +++ b/libstdc++-v3/include/bits/vector.tcc @@ -1,6 +1,6 @@ // Vector implementation (out of line) -*- C++ -*- -// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 +// Copyright (C) 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 @@ -326,7 +326,7 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D) const size_type __elems_before = __position - begin(); pointer __new_start(this->_M_allocate(__len)); pointer __new_finish(__new_start); - try + __try { // The order of the three operations is dictated by the C++0x // case, where the moves could alter a new element belonging @@ -352,7 +352,7 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D) __new_finish, _M_get_Tp_allocator()); } - catch(...) + __catch(...) { if (!__new_finish) this->_M_impl.destroy(__new_start + __elems_before); @@ -418,7 +418,7 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D) const size_type __elems_before = __position - begin(); pointer __new_start(this->_M_allocate(__len)); pointer __new_finish(__new_start); - try + __try { // See _M_insert_aux above. std::__uninitialized_fill_n_a(__new_start + __elems_before, @@ -439,7 +439,7 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D) __new_finish, _M_get_Tp_allocator()); } - catch(...) + __catch(...) { if (!__new_finish) std::_Destroy(__new_start + __elems_before, @@ -525,7 +525,7 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D) _M_check_len(__n, "vector::_M_range_insert"); pointer __new_start(this->_M_allocate(__len)); pointer __new_finish(__new_start); - try + __try { __new_finish = std::__uninitialized_move_a(this->_M_impl._M_start, @@ -542,7 +542,7 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D) __new_finish, _M_get_Tp_allocator()); } - catch(...) + __catch(...) { std::_Destroy(__new_start, __new_finish, _M_get_Tp_allocator()); diff --git a/libstdc++-v3/include/debug/deque b/libstdc++-v3/include/debug/deque index 845e0dcaaf24..2003734eca97 100644 --- a/libstdc++-v3/include/debug/deque +++ b/libstdc++-v3/include/debug/deque @@ -1,6 +1,6 @@ // Debugging deque implementation -*- C++ -*- -// Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008 +// Copyright (C) 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 @@ -416,12 +416,12 @@ namespace __debug iterator __victim = __position++; __victim._M_invalidate(); } - try + __try { return iterator(_Base::erase(__first.base(), __last.base()), this); } - catch(...) + __catch(...) { this->_M_revalidate_singular(); __throw_exception_again; diff --git a/libstdc++-v3/include/debug/list b/libstdc++-v3/include/debug/list index 312aeebef92d..96c100f59b8e 100644 --- a/libstdc++-v3/include/debug/list +++ b/libstdc++-v3/include/debug/list @@ -1,6 +1,6 @@ // Debugging list implementation -*- C++ -*- -// Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008 +// Copyright (C) 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,11 +256,11 @@ namespace __debug __real_victim._M_invalidate(); } - try + __try { _Base::resize(__sz, __c); } - catch(...) + __catch(...) { this->_M_revalidate_singular(); __throw_exception_again; diff --git a/libstdc++-v3/include/ext/memory b/libstdc++-v3/include/ext/memory index 0755d897507f..7f08f1605fc0 100644 --- a/libstdc++-v3/include/ext/memory +++ b/libstdc++-v3/include/ext/memory @@ -1,6 +1,7 @@ // Memory extensions -*- C++ -*- -// Copyright (C) 2002, 2004, 2005 Free Software Foundation, Inc. +// Copyright (C) 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 // software; you can redistribute it and/or modify it under the @@ -79,13 +80,13 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) _ForwardIter __result, std::input_iterator_tag) { _ForwardIter __cur = __result; - try + __try { for (; __count > 0 ; --__count, ++__first, ++__cur) std::_Construct(&*__cur, *__first); return pair<_InputIter, _ForwardIter>(__first, __cur); } - catch(...) + __catch(...) { std::_Destroy(__result, __cur); __throw_exception_again; @@ -138,13 +139,13 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) _Allocator __alloc) { _ForwardIter __cur = __result; - try + __try { for (; __count > 0 ; --__count, ++__first, ++__cur) __alloc.construct(&*__cur, *__first); return pair<_InputIter, _ForwardIter>(__first, __cur); } - catch(...) + __catch(...) { std::_Destroy(__result, __cur, __alloc); __throw_exception_again; diff --git a/libstdc++-v3/include/ext/pb_ds/detail/bin_search_tree_/constructors_destructor_fn_imps.hpp b/libstdc++-v3/include/ext/pb_ds/detail/bin_search_tree_/constructors_destructor_fn_imps.hpp index 295a57aee17f..617843b8718b 100644 --- a/libstdc++-v3/include/ext/pb_ds/detail/bin_search_tree_/constructors_destructor_fn_imps.hpp +++ b/libstdc++-v3/include/ext/pb_ds/detail/bin_search_tree_/constructors_destructor_fn_imps.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005, 2006 Free Software Foundation, Inc. +// 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 // software; you can redistribute it and/or modify it under the terms @@ -95,7 +95,7 @@ PB_DS_CLASS_NAME(const PB_DS_CLASS_C_DEC& other) : m_size = other.m_size; _GLIBCXX_DEBUG_ONLY(other.structure_only_assert_valid();) - try + __try { m_p_head->m_p_parent = recursive_copy_node(other.m_p_head->m_p_parent); if (m_p_head->m_p_parent != NULL) @@ -103,7 +103,7 @@ PB_DS_CLASS_NAME(const PB_DS_CLASS_C_DEC& other) : m_size = other.m_size; initialize_min_max(); } - catch(...) + __catch(...) { _GLIBCXX_DEBUG_ONLY(debug_base::clear();) s_node_allocator.deallocate(m_p_head, 1); @@ -163,11 +163,11 @@ recursive_copy_node(const node_pointer p_nd) return (NULL); node_pointer p_ret = s_node_allocator.allocate(1); - try + __try { new (p_ret) node(*p_nd); } - catch(...) + __catch(...) { s_node_allocator.deallocate(p_ret, 1); __throw_exception_again; @@ -175,12 +175,12 @@ recursive_copy_node(const node_pointer p_nd) p_ret->m_p_left = p_ret->m_p_right = NULL; - try + __try { p_ret->m_p_left = recursive_copy_node(p_nd->m_p_left); p_ret->m_p_right = recursive_copy_node(p_nd->m_p_right); } - catch(...) + __catch(...) { clear_imp(p_ret); __throw_exception_again; diff --git a/libstdc++-v3/include/ext/pb_ds/detail/binary_heap_/constructors_destructor_fn_imps.hpp b/libstdc++-v3/include/ext/pb_ds/detail/binary_heap_/constructors_destructor_fn_imps.hpp index b43529beeb3d..3cb485596310 100644 --- a/libstdc++-v3/include/ext/pb_ds/detail/binary_heap_/constructors_destructor_fn_imps.hpp +++ b/libstdc++-v3/include/ext/pb_ds/detail/binary_heap_/constructors_destructor_fn_imps.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005, 2006 Free Software Foundation, Inc. +// 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 // software; you can redistribute it and/or modify it under the terms @@ -109,7 +109,7 @@ binary_heap_(const PB_DS_CLASS_C_DEC& other) : const_iterator first_it = other.begin(); const_iterator last_it = other.end(); - try + __try { while (first_it != last_it) { @@ -117,7 +117,7 @@ binary_heap_(const PB_DS_CLASS_C_DEC& other) : ++first_it; } } - catch(...) + __catch(...) { for (size_type i = 0; i < m_size; ++i) erase_at(m_a_entries, i, s_no_throw_copies_ind); diff --git a/libstdc++-v3/include/ext/pb_ds/detail/binary_heap_/erase_fn_imps.hpp b/libstdc++-v3/include/ext/pb_ds/detail/binary_heap_/erase_fn_imps.hpp index 72686d129743..c7875df229d4 100644 --- a/libstdc++-v3/include/ext/pb_ds/detail/binary_heap_/erase_fn_imps.hpp +++ b/libstdc++-v3/include/ext/pb_ds/detail/binary_heap_/erase_fn_imps.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005, 2006 Free Software Foundation, Inc. +// 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 // software; you can redistribute it and/or modify it under the terms @@ -52,7 +52,7 @@ clear() for (size_type i = 0; i < m_size; ++i) erase_at(m_a_entries, i, s_no_throw_copies_ind); - try + __try { const size_type actual_size = resize_policy::get_new_size_for_arbitrary(0); @@ -66,7 +66,7 @@ clear() m_a_entries = a_entries; } - catch(...) + __catch(...) { } m_size = 0; @@ -135,7 +135,7 @@ erase_if(Pred pred) for (size_type i = left; i < m_size; ++i) erase_at(m_a_entries, i, s_no_throw_copies_ind); - try + __try { const size_type actual_size = resize_policy::get_new_size_for_arbitrary(left); @@ -150,7 +150,7 @@ erase_if(Pred pred) resize_policy::notify_arbitrary(m_actual_size); } - catch(...) + __catch(...) { }; m_size = left; @@ -197,7 +197,7 @@ resize_for_erase_if_needed() if (!resize_policy::resize_needed_for_shrink(m_size)) return; - try + __try { const size_type new_actual_size = resize_policy::get_new_size_for_shrink(); @@ -215,7 +215,7 @@ resize_for_erase_if_needed() m_a_entries = a_new_entries; } - catch(...) + __catch(...) { } } diff --git a/libstdc++-v3/include/ext/pb_ds/detail/binary_heap_/split_join_fn_imps.hpp b/libstdc++-v3/include/ext/pb_ds/detail/binary_heap_/split_join_fn_imps.hpp index 679efa5c4752..34259eab6970 100644 --- a/libstdc++-v3/include/ext/pb_ds/detail/binary_heap_/split_join_fn_imps.hpp +++ b/libstdc++-v3/include/ext/pb_ds/detail/binary_heap_/split_join_fn_imps.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005, 2006 Free Software Foundation, Inc. +// 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 // software; you can redistribute it and/or modify it under the terms @@ -77,13 +77,13 @@ split(Pred pred, PB_DS_CLASS_C_DEC& other) entry_pointer a_entries = NULL; entry_pointer a_other_entries = NULL; - try + __try { a_entries = s_entry_allocator.allocate(actual_size); a_other_entries = s_entry_allocator.allocate(other_actual_size); } - catch(...) + __catch(...) { if (a_entries != NULL) s_entry_allocator.deallocate(a_entries, actual_size); @@ -137,12 +137,12 @@ join(PB_DS_CLASS_C_DEC& other) entry_pointer a_entries = NULL; entry_pointer a_other_entries = NULL; - try + __try { a_entries = s_entry_allocator.allocate(actual_size); a_other_entries = s_entry_allocator.allocate(resize_policy::min_size); } - catch(...) + __catch(...) { if (a_entries != NULL) s_entry_allocator.deallocate(a_entries, actual_size); diff --git a/libstdc++-v3/include/ext/pb_ds/detail/cc_hash_table_map_/constructor_destructor_fn_imps.hpp b/libstdc++-v3/include/ext/pb_ds/detail/cc_hash_table_map_/constructor_destructor_fn_imps.hpp index e767bbec51fb..2593101f9e9c 100644 --- a/libstdc++-v3/include/ext/pb_ds/detail/cc_hash_table_map_/constructor_destructor_fn_imps.hpp +++ b/libstdc++-v3/include/ext/pb_ds/detail/cc_hash_table_map_/constructor_destructor_fn_imps.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005, 2006 Free Software Foundation, Inc. +// 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 // software; you can redistribute it and/or modify it under the terms @@ -139,11 +139,11 @@ PB_DS_CLASS_NAME(const PB_DS_CLASS_C_DEC& other) : { initialize(); _GLIBCXX_DEBUG_ONLY(PB_DS_CLASS_C_DEC::assert_valid();) - try + __try { copy_from_range(other.begin(), other.end()); } - catch(...) + __catch(...) { deallocate_all(); __throw_exception_again; diff --git a/libstdc++-v3/include/ext/pb_ds/detail/cc_hash_table_map_/resize_fn_imps.hpp b/libstdc++-v3/include/ext/pb_ds/detail/cc_hash_table_map_/resize_fn_imps.hpp index eda2c48da52e..036f9b842efc 100644 --- a/libstdc++-v3/include/ext/pb_ds/detail/cc_hash_table_map_/resize_fn_imps.hpp +++ b/libstdc++-v3/include/ext/pb_ds/detail/cc_hash_table_map_/resize_fn_imps.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005, 2006 Free Software Foundation, Inc. +// 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 // software; you can redistribute it and/or modify it under the terms @@ -69,11 +69,11 @@ do_resize_if_needed_no_throw() if (!resize_base::is_resize_needed()) return; - try + __try { resize_imp(resize_base::get_new_size(m_num_e, m_num_used_e)); } - catch(...) + __catch(...) { } _GLIBCXX_DEBUG_ONLY(assert_valid();) @@ -94,13 +94,13 @@ resize_imp(size_type new_size) // Following line might throw an exception. ranged_hash_fn_base::notify_resized(new_size); - try + __try { // Following line might throw an exception. a_p_entries_resized = s_entry_pointer_allocator.allocate(new_size); m_num_e = new_size; } - catch(...) + __catch(...) { ranged_hash_fn_base::notify_resized(old_size); __throw_exception_again; diff --git a/libstdc++-v3/include/ext/pb_ds/detail/debug_map_base.hpp b/libstdc++-v3/include/ext/pb_ds/detail/debug_map_base.hpp index 5319749128bc..568c50991a50 100644 --- a/libstdc++-v3/include/ext/pb_ds/detail/debug_map_base.hpp +++ b/libstdc++-v3/include/ext/pb_ds/detail/debug_map_base.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005, 2006, 2007, 2008 Free Software Foundation, Inc. +// 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 // software; you can redistribute it and/or modify it under the terms @@ -168,11 +168,11 @@ namespace __gnu_pbds std::abort(); } - try + __try { m_key_set.push_back(r_key); } - catch(...) + __catch(...) { std::cerr << "insert_new" << r_key << std::endl; std::abort(); diff --git a/libstdc++-v3/include/ext/pb_ds/detail/gp_hash_table_map_/constructor_destructor_fn_imps.hpp b/libstdc++-v3/include/ext/pb_ds/detail/gp_hash_table_map_/constructor_destructor_fn_imps.hpp index 6f4844cf00d5..3e8ae49d5ce1 100644 --- a/libstdc++-v3/include/ext/pb_ds/detail/gp_hash_table_map_/constructor_destructor_fn_imps.hpp +++ b/libstdc++-v3/include/ext/pb_ds/detail/gp_hash_table_map_/constructor_destructor_fn_imps.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005, 2006 Free Software Foundation, Inc. +// 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 // software; you can redistribute it and/or modify it under the terms @@ -152,7 +152,7 @@ PB_DS_CLASS_NAME(const PB_DS_CLASS_C_DEC& other) : for (size_type i = 0; i < m_num_e; ++i) m_entries[i].m_stat = (entry_status)empty_entry_status; - try + __try { for (size_type i = 0; i < m_num_e; ++i) { @@ -161,7 +161,7 @@ PB_DS_CLASS_NAME(const PB_DS_CLASS_C_DEC& other) : new (m_entries + i) entry(other.m_entries[i]); } } - catch(...) + __catch(...) { deallocate_all(); __throw_exception_again; diff --git a/libstdc++-v3/include/ext/pb_ds/detail/gp_hash_table_map_/resize_fn_imps.hpp b/libstdc++-v3/include/ext/pb_ds/detail/gp_hash_table_map_/resize_fn_imps.hpp index 4368d12d6261..ab6279f8907f 100644 --- a/libstdc++-v3/include/ext/pb_ds/detail/gp_hash_table_map_/resize_fn_imps.hpp +++ b/libstdc++-v3/include/ext/pb_ds/detail/gp_hash_table_map_/resize_fn_imps.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005, 2006 Free Software Foundation, Inc. +// 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 // software; you can redistribute it and/or modify it under the terms @@ -69,11 +69,11 @@ do_resize_if_needed_no_throw() if (!resize_base::is_resize_needed()) return; - try + __try { resize_imp(resize_base::get_new_size(m_num_e, m_num_used_e)); } - catch(...) + __catch(...) { } _GLIBCXX_DEBUG_ONLY(assert_valid();) @@ -104,11 +104,11 @@ resize_imp(size_type new_size) for (size_type i = 0; i < m_num_e; ++i) a_entries_resized[i].m_stat = empty_entry_status; - try + __try { resize_imp(a_entries_resized, old_size); } - catch(...) + __catch(...) { erase_all_valid_entries(a_entries_resized, new_size); m_num_e = old_size; diff --git a/libstdc++-v3/include/ext/pb_ds/detail/left_child_next_sibling_heap_/constructors_destructor_fn_imps.hpp b/libstdc++-v3/include/ext/pb_ds/detail/left_child_next_sibling_heap_/constructors_destructor_fn_imps.hpp index 85d2511cac6c..cd18a7b023b3 100644 --- a/libstdc++-v3/include/ext/pb_ds/detail/left_child_next_sibling_heap_/constructors_destructor_fn_imps.hpp +++ b/libstdc++-v3/include/ext/pb_ds/detail/left_child_next_sibling_heap_/constructors_destructor_fn_imps.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005, 2006 Free Software Foundation, Inc. +// 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 // software; you can redistribute it and/or modify it under the terms @@ -122,11 +122,11 @@ recursive_copy_node(const_node_pointer p_nd) node_pointer p_ret = s_node_allocator.allocate(1); - try + __try { new (p_ret) node(*p_nd); } - catch(...) + __catch(...) { s_node_allocator.deallocate(p_ret, 1); __throw_exception_again; @@ -135,12 +135,12 @@ recursive_copy_node(const_node_pointer p_nd) p_ret->m_p_l_child = p_ret->m_p_next_sibling = p_ret->m_p_prev_or_parent = NULL; - try + __try { p_ret->m_p_l_child = recursive_copy_node(p_nd->m_p_l_child); p_ret->m_p_next_sibling = recursive_copy_node(p_nd->m_p_next_sibling); } - catch(...) + __catch(...) { clear_imp(p_ret); __throw_exception_again; diff --git a/libstdc++-v3/include/ext/pb_ds/detail/list_update_map_/constructor_destructor_fn_imps.hpp b/libstdc++-v3/include/ext/pb_ds/detail/list_update_map_/constructor_destructor_fn_imps.hpp index a3d96ec2f28d..3be4df422d77 100644 --- a/libstdc++-v3/include/ext/pb_ds/detail/list_update_map_/constructor_destructor_fn_imps.hpp +++ b/libstdc++-v3/include/ext/pb_ds/detail/list_update_map_/constructor_destructor_fn_imps.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005, 2006 Free Software Foundation, Inc. +// 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 // software; you can redistribute it and/or modify it under the terms @@ -93,7 +93,7 @@ PB_DS_CLASS_NAME(const PB_DS_CLASS_C_DEC& other) : #endif m_p_l(NULL) { - try + __try { for (const_iterator it = other.begin(); it != other.end(); ++it) { @@ -104,7 +104,7 @@ m_p_l(NULL) m_p_l = p_l; } } - catch(...) + __catch(...) { deallocate_all(); __throw_exception_again; diff --git a/libstdc++-v3/include/ext/pb_ds/detail/pat_trie_/constructors_destructor_fn_imps.hpp b/libstdc++-v3/include/ext/pb_ds/detail/pat_trie_/constructors_destructor_fn_imps.hpp index efa2e6104e51..40bd0a0d9ecb 100644 --- a/libstdc++-v3/include/ext/pb_ds/detail/pat_trie_/constructors_destructor_fn_imps.hpp +++ b/libstdc++-v3/include/ext/pb_ds/detail/pat_trie_/constructors_destructor_fn_imps.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005, 2006 Free Software Foundation, Inc. +// 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 // software; you can redistribute it and/or modify it under the terms @@ -96,11 +96,11 @@ PB_DS_CLASS_NAME(const PB_DS_CLASS_C_DEC& other) : _GLIBCXX_DEBUG_ONLY(assert_valid();) return; } - try + __try { m_p_head->m_p_parent = recursive_copy_node(other.m_p_head->m_p_parent); } - catch(...) + __catch(...) { s_head_allocator.deallocate(m_p_head, 1); __throw_exception_again; @@ -193,13 +193,13 @@ recursive_copy_node(const_node_pointer p_other_nd) p_other_internal_nd->begin(); internal_node_pointer p_ret; - try + __try { while (child_it != p_other_internal_nd->end()) a_p_children[child_i++] = recursive_copy_node(*(child_it++)); p_ret = s_internal_node_allocator.allocate(1); } - catch(...) + __catch(...) { while (child_i-- > 0) clear_imp(a_p_children[child_i]); diff --git a/libstdc++-v3/include/ext/pb_ds/detail/pat_trie_/split_join_branch_bag.hpp b/libstdc++-v3/include/ext/pb_ds/detail/pat_trie_/split_join_branch_bag.hpp index bf04cb4ab7cb..b727518a0dcd 100644 --- a/libstdc++-v3/include/ext/pb_ds/detail/pat_trie_/split_join_branch_bag.hpp +++ b/libstdc++-v3/include/ext/pb_ds/detail/pat_trie_/split_join_branch_bag.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005, 2006 Free Software Foundation, Inc. +// 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 // software; you can redistribute it and/or modify it under the terms @@ -60,11 +60,11 @@ public: add_branch() { internal_node_pointer p_nd = s_internal_node_allocator.allocate(1); - try + __try { m_bag.push_back(p_nd); } - catch(...) + __catch(...) { s_internal_node_allocator.deallocate(p_nd, 1); __throw_exception_again; diff --git a/libstdc++-v3/include/ext/pb_ds/detail/resize_policy/hash_load_check_resize_trigger_imp.hpp b/libstdc++-v3/include/ext/pb_ds/detail/resize_policy/hash_load_check_resize_trigger_imp.hpp index 8be9245110ae..594965f00b8c 100644 --- a/libstdc++-v3/include/ext/pb_ds/detail/resize_policy/hash_load_check_resize_trigger_imp.hpp +++ b/libstdc++-v3/include/ext/pb_ds/detail/resize_policy/hash_load_check_resize_trigger_imp.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005, 2006, 2007 Free Software Foundation, Inc. +// 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 // software; you can redistribute it and/or modify it under the terms @@ -259,13 +259,13 @@ set_loads(std::pair load_pair) const size_type old_next_grow_size = m_next_grow_size; const bool old_resize_needed = m_resize_needed; - try + __try { m_load_min = load_pair.first; m_load_max = load_pair.second; do_resize(static_cast(size_base::get_size() / ((m_load_min + m_load_max) / 2))); } - catch(...) + __catch(...) { m_load_min = old_load_min; m_load_max = old_load_max; diff --git a/libstdc++-v3/include/ext/pb_ds/detail/resize_policy/hash_standard_resize_policy_imp.hpp b/libstdc++-v3/include/ext/pb_ds/detail/resize_policy/hash_standard_resize_policy_imp.hpp index a37ccc0be9ed..706af42d004e 100644 --- a/libstdc++-v3/include/ext/pb_ds/detail/resize_policy/hash_standard_resize_policy_imp.hpp +++ b/libstdc++-v3/include/ext/pb_ds/detail/resize_policy/hash_standard_resize_policy_imp.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005, 2006, 2007 Free Software Foundation, Inc. +// 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 // software; you can redistribute it and/or modify it under the terms @@ -205,16 +205,16 @@ resize(size_type new_size) --actual_size; const size_type old_size = m_size; - try + __try { do_resize(actual_size - 1); } - catch(insert_error& ) + __catch(insert_error& ) { m_size = old_size; __throw_resize_error(); } - catch(...) + __catch(...) { m_size = old_size; __throw_exception_again; diff --git a/libstdc++-v3/include/ext/rc_string_base.h b/libstdc++-v3/include/ext/rc_string_base.h index 213e3cf1c973..ff2c9a8eca9c 100644 --- a/libstdc++-v3/include/ext/rc_string_base.h +++ b/libstdc++-v3/include/ext/rc_string_base.h @@ -1,6 +1,6 @@ // Reference-counted versatile string base -*- C++ -*- -// Copyright (C) 2005, 2006, 2007, 2008 Free Software Foundation, Inc. +// 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 // software; you can redistribute it and/or modify it under the @@ -515,7 +515,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) } _Rep* __r = _Rep::_S_create(__len, size_type(0), __a); _S_copy(__r->_M_refdata(), __buf, __len); - try + __try { while (__beg != __end) { @@ -531,7 +531,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) ++__beg; } } - catch(...) + __catch(...) { __r->_M_destroy(__a); __throw_exception_again; @@ -559,9 +559,9 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) __end)); // Check for out_of_range and length_error exceptions. _Rep* __r = _Rep::_S_create(__dnew, size_type(0), __a); - try + __try { _S_copy_chars(__r->_M_refdata(), __beg, __end); } - catch(...) + __catch(...) { __r->_M_destroy(__a); __throw_exception_again; diff --git a/libstdc++-v3/include/ext/rope b/libstdc++-v3/include/ext/rope index b85f98e3be40..642f927c9614 100644 --- a/libstdc++-v3/include/ext/rope +++ b/libstdc++-v3/include/ext/rope @@ -1,6 +1,6 @@ // SGI's rope class -*- C++ -*- -// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 +// Copyright (C) 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 @@ -1689,9 +1689,9 @@ protected: __uninitialized_copy_n_a(__s, __size, __buf, __a); _S_cond_store_eos(__buf[__size]); - try + __try { return _S_new_RopeLeaf(__buf, __size, __a); } - catch(...) + __catch(...) { _RopeRep::__STL_FREE_STRING(__buf, __size, __a); __throw_exception_again; @@ -1845,12 +1845,12 @@ protected: _CharT* __buf = this->_Data_allocate(_S_rounded_up_size(1)); _M_get_allocator().construct(__buf, __c); - try + __try { this->_M_tree_ptr = _S_new_RopeLeaf(__buf, 1, _M_get_allocator()); } - catch(...) + __catch(...) { _RopeRep::__STL_FREE_STRING(__buf, 1, _M_get_allocator()); __throw_exception_again; @@ -1924,13 +1924,13 @@ protected: _RopeRep* __old = this->_M_tree_ptr; _RopeRep* __left = __STL_ROPE_FROM_UNOWNED_CHAR_PTR(&__x, 1, _M_get_allocator()); - try + __try { this->_M_tree_ptr = _S_concat(__left, this->_M_tree_ptr); _S_unref(__old); _S_unref(__left); } - catch(...) + __catch(...) { _S_unref(__left); __throw_exception_again; diff --git a/libstdc++-v3/include/ext/ropeimpl.h b/libstdc++-v3/include/ext/ropeimpl.h index 95dd8c2f722a..8b330801366c 100644 --- a/libstdc++-v3/include/ext/ropeimpl.h +++ b/libstdc++-v3/include/ext/ropeimpl.h @@ -1,6 +1,6 @@ // SGI's rope class implementation -*- C++ -*- -// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007 +// Copyright (C) 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 @@ -439,12 +439,12 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) uninitialized_copy_n(__r->_M_data, __old_len, __new_data); uninitialized_copy_n(__iter, __len, __new_data + __old_len); _S_cond_store_eos(__new_data[__old_len + __len]); - try + __try { __result = _S_new_RopeLeaf(__new_data, __old_len + __len, __r->_M_get_allocator()); } - catch(...) + __catch(...) { _RopeRep::__STL_FREE_STRING(__new_data, __old_len + __len, __r->_M_get_allocator()); @@ -507,12 +507,12 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) { _RopeRep* __balanced; - try + __try { __balanced = _S_balance(__result); __result->_M_unref_nonnil(); } - catch(...) + __catch(...) { _C_deallocate(__result,1); __throw_exception_again; @@ -558,9 +558,9 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) _RopeRep* __nright = _S_leaf_concat_char_iter((_RopeLeaf*)__right, __s, __slen); __left->_M_ref_nonnil(); - try + __try { __result = _S_tree_concat(__left, __nright); } - catch(...) + __catch(...) { _S_unref(__left); _S_unref(__nright); @@ -571,12 +571,12 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) } _RopeRep* __nright = __STL_ROPE_FROM_UNOWNED_CHAR_PTR(__s, __slen, __r->_M_get_allocator()); - try + __try { __r->_M_ref_nonnil(); __result = _S_tree_concat(__r, __nright); } - catch(...) + __catch(...) { _S_unref(__r); _S_unref(__nright); @@ -638,9 +638,9 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) _RopeRep* __right = __STL_ROPE_FROM_UNOWNED_CHAR_PTR(__s, __slen, __r->_M_get_allocator()); __r->_M_ref_nonnil(); - try + __try { __result = _S_tree_concat(__r, __right); } - catch(...) + __catch(...) { _S_unref(__r); _S_unref(__right); @@ -690,9 +690,9 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) _M_data, __right->_M_size); __leftleft->_M_ref_nonnil(); - try + __try { return(_S_tree_concat(__leftleft, __rest)); } - catch(...) + __catch(...) { _S_unref(__leftleft); _S_unref(__rest); @@ -703,9 +703,9 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) } __left->_M_ref_nonnil(); __right->_M_ref_nonnil(); - try + __try { return(_S_tree_concat(__left, __right)); } - catch(...) + __catch(...) { _S_unref(__left); _S_unref(__right); @@ -818,9 +818,9 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) goto lazy; __section = (_CharT*) _Data_allocate(_S_rounded_up_size(__result_len)); - try + __try { (*(__f->_M_fn))(__start, __result_len, __section); } - catch(...) + __catch(...) { _RopeRep::__STL_FREE_STRING(__section, __result_len, __base->_M_get_allocator()); @@ -965,13 +965,13 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) bool __result; _CharT* __buffer = (_CharT*)_Alloc().allocate(__len * sizeof(_CharT)); - try + __try { (*(__f->_M_fn))(__begin, __len, __buffer); __result = __c(__buffer, __len); _Alloc().deallocate(__buffer, __len * sizeof(_CharT)); } - catch(...) + __catch(...) { _Alloc().deallocate(__buffer, __len * sizeof(_CharT)); __throw_exception_again; @@ -1027,7 +1027,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) if (!__is_simple) __o.width(__w / __rope_len); - try + __try { if (__is_simple && !__left && __pad_len > 0) _Rope_fill(__o, __pad_len); @@ -1037,7 +1037,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) if (!__is_simple) __o.width(__w); } - catch(...) + __catch(...) { if (!__is_simple) __o.width(__w); @@ -1216,7 +1216,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) for (__i = 0; __i <= int(__detail::_S_max_rope_depth); ++__i) __forest[__i] = 0; - try + __try { _S_add_to_forest(__r, __forest); for (__i = 0; __i <= int(__detail::_S_max_rope_depth); ++__i) @@ -1232,7 +1232,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) #endif } } - catch(...) + __catch(...) { for(__i = 0; __i <= int(__detail::_S_max_rope_depth); __i++) _S_unref(__forest[__i]); @@ -1552,10 +1552,10 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) __uninitialized_fill_n_a(__rest_buffer, __rest, __c, _M_get_allocator()); _S_cond_store_eos(__rest_buffer[__rest]); - try + __try { __remainder = _S_new_RopeLeaf(__rest_buffer, __rest, _M_get_allocator()); } - catch(...) + __catch(...) { _RopeRep::__STL_FREE_STRING(__rest_buffer, __rest, _M_get_allocator()); @@ -1572,13 +1572,13 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) __uninitialized_fill_n_a(__base_buffer, __exponentiate_threshold, __c, _M_get_allocator()); _S_cond_store_eos(__base_buffer[__exponentiate_threshold]); - try + __try { __base_leaf = _S_new_RopeLeaf(__base_buffer, __exponentiate_threshold, _M_get_allocator()); } - catch(...) + __catch(...) { _RopeRep::__STL_FREE_STRING(__base_buffer, __exponentiate_threshold, diff --git a/libstdc++-v3/include/ext/slist b/libstdc++-v3/include/ext/slist index 7ae9ffbe1015..ea6c3c076e95 100644 --- a/libstdc++-v3/include/ext/slist +++ b/libstdc++-v3/include/ext/slist @@ -1,6 +1,7 @@ // Singly-linked list implementation -*- C++ -*- -// Copyright (C) 2001, 2002, 2004, 2005, 2007 Free Software Foundation, Inc. +// Copyright (C) 2001, 2002, 2004, 2005, 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 @@ -327,12 +328,12 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) _M_create_node(const value_type& __x) { _Node* __node = this->_M_get_node(); - try + __try { get_allocator().construct(&__node->_M_data, __x); __node->_M_next = 0; } - catch(...) + __catch(...) { this->_M_put_node(__node); __throw_exception_again; @@ -344,12 +345,12 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) _M_create_node() { _Node* __node = this->_M_get_node(); - try + __try { get_allocator().construct(&__node->_M_data, value_type()); __node->_M_next = 0; } - catch(...) + __catch(...) { this->_M_put_node(__node); __throw_exception_again; diff --git a/libstdc++-v3/include/ext/sso_string_base.h b/libstdc++-v3/include/ext/sso_string_base.h index 73c6a1b2df06..a50f48f99850 100644 --- a/libstdc++-v3/include/ext/sso_string_base.h +++ b/libstdc++-v3/include/ext/sso_string_base.h @@ -1,6 +1,6 @@ // Short-string-optimized versatile string base -*- C++ -*- -// Copyright (C) 2005, 2006, 2007, 2008 Free Software Foundation, Inc. +// 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 // software; you can redistribute it and/or modify it under the @@ -398,7 +398,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) ++__beg; } - try + __try { while (__beg != __end) { @@ -416,7 +416,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) ++__beg; } } - catch(...) + __catch(...) { _M_dispose(); __throw_exception_again; @@ -446,9 +446,9 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) } // Check for out_of_range and length_error exceptions. - try + __try { _S_copy_chars(_M_data(), __beg, __end); } - catch(...) + __catch(...) { _M_dispose(); __throw_exception_again; diff --git a/libstdc++-v3/include/ext/vstring.tcc b/libstdc++-v3/include/ext/vstring.tcc index 8d5b1b5e7752..1ba2321281ab 100644 --- a/libstdc++-v3/include/ext/vstring.tcc +++ b/libstdc++-v3/include/ext/vstring.tcc @@ -1,6 +1,6 @@ // Versatile string -*- C++ -*- -// Copyright (C) 2005, 2006, 2007 Free Software Foundation, Inc. +// 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 // software; you can redistribute it and/or modify it under the @@ -567,7 +567,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) typename __istream_type::sentry __cerb(__in, false); if (__cerb) { - try + __try { // Avoid reallocation for common case. __str.erase(); @@ -600,12 +600,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<> @@ -641,7 +641,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) typename __istream_type::sentry __cerb(__in, true); if (__cerb) { - try + __try { // Avoid reallocation for common case. __str.erase(); @@ -676,12 +676,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/include/std/bitset b/libstdc++-v3/include/std/bitset index 67dfd6945517..f8f001f8b6f7 100644 --- a/libstdc++-v3/include/std/bitset +++ b/libstdc++-v3/include/std/bitset @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 +// Copyright (C) 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 @@ -1326,7 +1326,7 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D) typename __istream_type::sentry __sentry(__is); if (__sentry) { - try + __try { for (size_t __i = _Nb; __i > 0; --__i) { @@ -1355,12 +1355,12 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D) } } } - catch(__cxxabiv1::__forced_unwind&) + __catch(__cxxabiv1::__forced_unwind&) { __is._M_setstate(__ios_base::badbit); __throw_exception_again; } - catch(...) + __catch(...) { __is._M_setstate(__ios_base::badbit); } } diff --git a/libstdc++-v3/include/tr1/hypergeometric.tcc b/libstdc++-v3/include/tr1/hypergeometric.tcc index 5e6902f98ed1..e5f35e291118 100644 --- a/libstdc++-v3/include/tr1/hypergeometric.tcc +++ b/libstdc++-v3/include/tr1/hypergeometric.tcc @@ -1,6 +1,6 @@ // Special functions -*- C++ -*- -// Copyright (C) 2006, 2007, 2008 +// Copyright (C) 2006, 2007, 2008, 2009 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free @@ -477,13 +477,13 @@ namespace tr1 bool __ok_d1 = true; _Tp __lng_ad, __lng_ad1, __lng_bd1; - try + __try { __lng_ad = __log_gamma(__ad); __lng_ad1 = __log_gamma(__a + __d1); __lng_bd1 = __log_gamma(__b + __d1); } - catch(...) + __catch(...) { __ok_d1 = false; } @@ -525,12 +525,12 @@ namespace tr1 // Evaluate F2. bool __ok_d2 = true; _Tp __lng_ad2, __lng_bd2; - try + __try { __lng_ad2 = __log_gamma(__a + __d2); __lng_bd2 = __log_gamma(__b + __d2); } - catch(...) + __catch(...) { __ok_d2 = false; } @@ -600,14 +600,14 @@ namespace tr1 bool __ok1 = true; _Tp __sgn_g1ca = _Tp(0), __ln_g1ca = _Tp(0); _Tp __sgn_g1cb = _Tp(0), __ln_g1cb = _Tp(0); - try + __try { __sgn_g1ca = __log_gamma_sign(__c - __a); __ln_g1ca = __log_gamma(__c - __a); __sgn_g1cb = __log_gamma_sign(__c - __b); __ln_g1cb = __log_gamma(__c - __b); } - catch(...) + __catch(...) { __ok1 = false; } @@ -615,14 +615,14 @@ namespace tr1 bool __ok2 = true; _Tp __sgn_g2a = _Tp(0), __ln_g2a = _Tp(0); _Tp __sgn_g2b = _Tp(0), __ln_g2b = _Tp(0); - try + __try { __sgn_g2a = __log_gamma_sign(__a); __ln_g2a = __log_gamma(__a); __sgn_g2b = __log_gamma_sign(__b); __ln_g2b = __log_gamma(__b); } - catch(...) + __catch(...) { __ok2 = false; } diff --git a/libstdc++-v3/include/tr1/shared_ptr.h b/libstdc++-v3/include/tr1/shared_ptr.h index 2dcb90a397a2..a21561433d90 100644 --- a/libstdc++-v3/include/tr1/shared_ptr.h +++ b/libstdc++-v3/include/tr1/shared_ptr.h @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2007, 2008 Free Software Foundation, Inc. +// Copyright (C) 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 @@ -110,13 +110,13 @@ namespace tr1 template __shared_count(_Ptr __p) : _M_pi(0) { - try + __try { typedef typename std::tr1::remove_pointer<_Ptr>::type _Tp; _M_pi = new _Sp_counted_base_impl<_Ptr, _Sp_deleter<_Tp>, _Lp>( __p, _Sp_deleter<_Tp>()); } - catch(...) + __catch(...) { delete __p; __throw_exception_again; @@ -126,11 +126,11 @@ namespace tr1 template __shared_count(_Ptr __p, _Deleter __d) : _M_pi(0) { - try + __try { _M_pi = new _Sp_counted_base_impl<_Ptr, _Deleter, _Lp>(__p, __d); } - catch(...) + __catch(...) { __d(__p); // Call _Deleter on __p. __throw_exception_again; @@ -709,11 +709,11 @@ namespace tr1 if (expired()) return __shared_ptr(); - try + __try { return __shared_ptr(*this); } - catch(const bad_weak_ptr&) + __catch(const bad_weak_ptr&) { // Q: How can we get here? // A: Another thread may have invalidated r after the @@ -958,11 +958,11 @@ namespace tr1 if (this->expired()) return shared_ptr<_Tp>(); - try + __try { return shared_ptr<_Tp>(*this); } - catch(const bad_weak_ptr&) + __catch(const bad_weak_ptr&) { return shared_ptr<_Tp>(); } diff --git a/libstdc++-v3/include/tr1_impl/hashtable b/libstdc++-v3/include/tr1_impl/hashtable index c6f1ac7aff6d..c8651088cb23 100644 --- a/libstdc++-v3/include/tr1_impl/hashtable +++ b/libstdc++-v3/include/tr1_impl/hashtable @@ -1,6 +1,6 @@ // Internal header for TR1 unordered_set and unordered_map -*- C++ -*- -// Copyright (C) 2007, 2008 Free Software Foundation, Inc. +// Copyright (C) 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 @@ -482,7 +482,7 @@ _GLIBCXX_BEGIN_NAMESPACE_TR1 _M_allocate_node(const value_type& __v) { _Node* __n = _M_node_allocator.allocate(1); - try + __try { #ifdef _GLIBCXX_INCLUDE_AS_CXX0X _M_node_allocator.construct(__n, __v); @@ -492,7 +492,7 @@ _GLIBCXX_BEGIN_NAMESPACE_TR1 __n->_M_next = 0; return __n; } - catch(...) + __catch(...) { _M_node_allocator.deallocate(__n, 1); __throw_exception_again; @@ -624,12 +624,12 @@ _GLIBCXX_BEGIN_NAMESPACE_TR1 __distance_fw(__f, __l))); _M_buckets = _M_allocate_buckets(_M_bucket_count); - try + __try { for (; __f != __l; ++__f) this->insert(*__f); } - catch(...) + __catch(...) { clear(); _M_deallocate_buckets(_M_buckets, _M_bucket_count); @@ -654,7 +654,7 @@ _GLIBCXX_BEGIN_NAMESPACE_TR1 _M_rehash_policy(__ht._M_rehash_policy) { _M_buckets = _M_allocate_buckets(_M_bucket_count); - try + __try { for (size_type __i = 0; __i < __ht._M_bucket_count; ++__i) { @@ -669,7 +669,7 @@ _GLIBCXX_BEGIN_NAMESPACE_TR1 } } } - catch(...) + __catch(...) { clear(); _M_deallocate_buckets(_M_buckets, _M_bucket_count); @@ -946,7 +946,7 @@ _GLIBCXX_BEGIN_NAMESPACE_TR1 // do a rehash if the allocation throws. _Node* __new_node = _M_allocate_node(__v); - try + __try { if (__do_rehash.first) { @@ -961,7 +961,7 @@ _GLIBCXX_BEGIN_NAMESPACE_TR1 ++_M_element_count; return iterator(__new_node, _M_buckets + __n); } - catch(...) + __catch(...) { _M_deallocate_node(__new_node); __throw_exception_again; @@ -1239,7 +1239,7 @@ _GLIBCXX_BEGIN_NAMESPACE_TR1 _M_rehash(size_type __n) { _Node** __new_array = _M_allocate_buckets(__n); - try + __try { for (size_type __i = 0; __i < _M_bucket_count; ++__i) while (_Node* __p = _M_buckets[__i]) @@ -1253,7 +1253,7 @@ _GLIBCXX_BEGIN_NAMESPACE_TR1 _M_bucket_count = __n; _M_buckets = __new_array; } - catch(...) + __catch(...) { // A failure here means that a hash function threw an exception. // We can't restore the previous state without calling the hash diff --git a/libstdc++-v3/libsupc++/eh_call.cc b/libstdc++-v3/libsupc++/eh_call.cc index 497d8623c671..1f64cfde224a 100644 --- a/libstdc++-v3/libsupc++/eh_call.cc +++ b/libstdc++-v3/libsupc++/eh_call.cc @@ -1,5 +1,6 @@ // -*- C++ -*- Helpers for calling unextected and terminate -// Copyright (C) 2001, 2002, 2003, 2008 Free Software Foundation, Inc. +// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 +// Free Software Foundation, Inc. // // This file is part of GCC. // @@ -108,14 +109,14 @@ __cxa_call_unexpected(void* exc_obj_in) } end_catch_protect_obj; - try + __try { if (foreign_exception) std::unexpected(); else __unexpected(unexpectedHandler); } - catch(...) + __catch(...) { /* See if the new exception matches the rtti list. */ if (foreign_exception) diff --git a/libstdc++-v3/libsupc++/eh_personality.cc b/libstdc++-v3/libsupc++/eh_personality.cc index 12b54c16587d..177fe417584d 100644 --- a/libstdc++-v3/libsupc++/eh_personality.cc +++ b/libstdc++-v3/libsupc++/eh_personality.cc @@ -1,5 +1,6 @@ // -*- C++ -*- The GNU C++ exception personality routine. -// Copyright (C) 2001, 2002, 2003, 2006, 2008 Free Software Foundation, Inc. +// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 +// Free Software Foundation, Inc. // // This file is part of GCC. // @@ -664,9 +665,9 @@ PERSONALITY_FUNCTION (int version, std::terminate (); else if (handler_switch_value < 0) { - try + __try { std::unexpected (); } - catch(...) + __catch(...) { std::terminate (); } } } @@ -753,9 +754,9 @@ __cxa_call_unexpected (void *exc_obj_in) xh_terminate_handler = xh->terminateHandler; info.ttype_base = (_Unwind_Ptr) xh->catchTemp; - try + __try { __unexpected (xh->unexpectedHandler); } - catch(...) + __catch(...) { // Get the exception thrown from unexpected. diff --git a/libstdc++-v3/libsupc++/exception_defines.h b/libstdc++-v3/libsupc++/exception_defines.h index 446ed9466cb2..342806bbb863 100644 --- a/libstdc++-v3/libsupc++/exception_defines.h +++ b/libstdc++-v3/libsupc++/exception_defines.h @@ -1,6 +1,7 @@ // -fno-exceptions Support -*- C++ -*- -// Copyright (C) 2001, 2003 Free Software Foundation, Inc. +// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 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 @@ -40,11 +41,13 @@ #ifndef __EXCEPTIONS // Iff -fno-exceptions, transform error handling code to work without it. -# define try if (true) -# define catch(X) if (false) +# define __try if (true) +# define __catch(X) if (false) # define __throw_exception_again #else // Else proceed normally. +# define __try try +# define __catch(X) catch(X) # define __throw_exception_again throw #endif diff --git a/libstdc++-v3/libsupc++/exception_ptr.h b/libstdc++-v3/libsupc++/exception_ptr.h index 3f57b431e612..ae07db5f7949 100644 --- a/libstdc++-v3/libsupc++/exception_ptr.h +++ b/libstdc++-v3/libsupc++/exception_ptr.h @@ -1,6 +1,6 @@ // Exception Handling support header (exception_ptr class) for -*- C++ -*- -// Copyright (C) 2008 Free Software Foundation +// Copyright (C) 2008, 2009 Free Software Foundation // // This file is part of GCC. // @@ -39,6 +39,7 @@ #pragma GCC visibility push(default) #include +#include #if !defined(_GLIBCXX_ATOMIC_BUILTINS_4) # error This platform does not support exception propagation. @@ -152,11 +153,11 @@ namespace std template exception_ptr copy_exception(_Ex __ex) throw() { - try + __try { throw __ex; } - catch(...) + __catch(...) { return current_exception (); } diff --git a/libstdc++-v3/src/bitmap_allocator.cc b/libstdc++-v3/src/bitmap_allocator.cc index 46b4d3c2babe..1d30b96a701a 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 (::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 b4f942d3ce7e..13f13cfcc982 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 fc140c0c3c37..ec07ef068887 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::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 50621aaeb5a6..9db8f7d56346 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 319202ee4c3a..a5b7f605fe8e 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 7c30fc0bfe32..c87fcc935939 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 5f5ec5f62e97..875dbd4a3e16 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 357034f60b23..58e60cfe26b4 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(); }