This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
[v3] Fix libstdc++/25191
- From: Paolo Carlini <paolo dot carlini at oracle dot com>
- To: Gcc Patch List <gcc-patches at gcc dot gnu dot org>
- Cc: libstdc++ <libstdc++ at gcc dot gnu dot org>
- Date: Wed, 04 Feb 2009 00:45:53 +0100
- Subject: [v3] Fix libstdc++/25191
Hi,
tested x86_64-linux, committed to mainline.
Paolo.
///////////////////////
2009-02-03 Paolo Carlini <paolo.carlini@oracle.com>
PR libstdc++/25191
* libsupc++/exception_defines.h: Depending on __EXCEPTIONS,
deal consistently with __try and __catch too.
* src/localename.cc: Replace try -> __try, catch -> __catch.
* src/ios.cc: Likewise.
* src/locale.cc: Likewise.
* src/istream.cc: Likewise.
* src/thread.cc: Likewise.
* src/compatibility.cc: Likewise.
* src/bitmap_allocator.cc: Likewise.
* src/ios_init.cc: Likewise.
* include/debug/deque: Likewise.
* include/debug/list: Likewise.
* include/tr1_impl/hashtable: Likewise.
* include/std/bitset: Likewise.
* include/ext/pb_ds/detail/resize_policy/
hash_load_check_resize_trigger_imp.hpp: Likewise.
* include/ext/pb_ds/detail/resize_policy/
hash_standard_resize_policy_imp.hpp: Likewise.
* include/ext/pb_ds/detail/cc_hash_table_map_/
resize_fn_imps.hpp: Likewise.
* include/ext/pb_ds/detail/cc_hash_table_map_/
constructor_destructor_fn_imps.hpp: Likewise.
* include/ext/pb_ds/detail/pat_trie_/
split_join_branch_bag.hpp: Likewise.
* include/ext/pb_ds/detail/pat_trie_/
constructors_destructor_fn_imps.hpp: Likewise.
* include/ext/pb_ds/detail/bin_search_tree_/
constructors_destructor_fn_imps.hpp: Likewise.
* include/ext/pb_ds/detail/gp_hash_table_map_/
resize_fn_imps.hpp: Likewise.
* include/ext/pb_ds/detail/gp_hash_table_map_/
constructor_destructor_fn_imps.hpp: Likewise.
* include/ext/pb_ds/detail/binary_heap_/
constructors_destructor_fn_imps.hpp: Likewise.
* include/ext/pb_ds/detail/binary_heap_/
erase_fn_imps.hpp: Likewise.
* include/ext/pb_ds/detail/binary_heap_/
split_join_fn_imps.hpp: Likewise.
* include/ext/pb_ds/detail/left_child_next_sibling_heap_/
constructors_destructor_fn_imps.hpp: Likewise.
* include/ext/pb_ds/detail/debug_map_base.hpp: Likewise.
* include/ext/pb_ds/detail/list_update_map_/
constructor_destructor_fn_imps.hpp: Likewise.
* include/ext/slist: Likewise.
* include/ext/memory: Likewise.
* include/ext/rc_string_base.h: Likewise.
* include/ext/ropeimpl.h: Likewise.
* include/ext/vstring.tcc: Likewise.
* include/ext/rope: Likewise.
* include/ext/sso_string_base.h: Likewise.
* include/bits/shared_ptr.h: Likewise.
* include/bits/stl_list.h: Likewise.
* include/bits/locale_classes.tcc: Likewise.
* include/bits/locale_facets.tcc: Likewise.
* include/bits/locale_classes.h: Likewise.
* include/bits/forward_list.h: Likewise.
* include/bits/stl_vector.h: Likewise.
* include/bits/stl_deque.h: Likewise.
* include/bits/istream.tcc: Likewise.
* include/bits/stl_uninitialized.h: Likewise.
* include/bits/ostream.tcc: Likewise.
* include/bits/vector.tcc: Likewise.
* include/bits/stl_tempbuf.h: Likewise.
* include/bits/deque.tcc: Likewise.
* include/bits/basic_string.tcc: Likewise.
* include/bits/ostream_insert.h: Likewise.
* include/bits/locale_facets_nonio.tcc: Likewise.
* include/bits/stl_tree.h: Likewise.
* include/bits/fstream.tcc: Likewise.
* include/tr1/shared_ptr.h: Likewise.
* include/tr1/hypergeometric.tcc: Likewise.
* include/backward/hashtable.h: Likewise.
* libsupc++/exception_ptr.h: Likewise.
* libsupc++/eh_personality.cc: Likewise.
* libsupc++/eh_call.cc: Likewise.
* config/locale/gnu/monetary_members.cc: Likewise.
* config/locale/gnu/time_members.h: Likewise.
* config/locale/generic/time_members.h: Likewise.
Index: src/localename.cc
===================================================================
*** src/localename.cc (revision 143902)
--- src/localename.cc (working copy)
***************
*** 1,5 ****
// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
! // 2006, 2007, 2008
// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
--- 1,5 ----
// 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
*************** _GLIBCXX_BEGIN_NAMESPACE(std)
*** 166,174 ****
__cat = _S_normalize_category(__cat);
_M_impl = new _Impl(*__base._M_impl, 1);
! try
{ _M_impl->_M_replace_categories(__add._M_impl, __cat); }
! catch (...)
{
_M_impl->_M_remove_reference();
__throw_exception_again;
--- 166,174 ----
__cat = _S_normalize_category(__cat);
_M_impl = new _Impl(*__base._M_impl, 1);
! __try
{ _M_impl->_M_replace_categories(__add._M_impl, __cat); }
! __catch (...)
{
_M_impl->_M_remove_reference();
__throw_exception_again;
*************** _GLIBCXX_BEGIN_NAMESPACE(std)
*** 186,192 ****
__c_locale __cloc;
locale::facet::_S_create_c_locale(__cloc, __s);
! try
{
_M_facets = new const facet*[_M_facets_size];
for (size_t __i = 0; __i < _M_facets_size; ++__i)
--- 186,192 ----
__c_locale __cloc;
locale::facet::_S_create_c_locale(__cloc, __s);
! __try
{
_M_facets = new const facet*[_M_facets_size];
for (size_t __i = 0; __i < _M_facets_size; ++__i)
*************** _GLIBCXX_BEGIN_NAMESPACE(std)
*** 254,260 ****
#endif
locale::facet::_S_destroy_c_locale(__cloc);
}
! catch(...)
{
locale::facet::_S_destroy_c_locale(__cloc);
this->~_Impl();
--- 254,260 ----
#endif
locale::facet::_S_destroy_c_locale(__cloc);
}
! __catch(...)
{
locale::facet::_S_destroy_c_locale(__cloc);
this->~_Impl();
Index: src/ios.cc
===================================================================
*** src/ios.cc (revision 143902)
--- src/ios.cc (working copy)
***************
*** 1,6 ****
// Iostreams base classes -*- C++ -*-
! // Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
--- 1,7 ----
// Iostreams base classes -*- C++ -*-
! // 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
*************** _GLIBCXX_BEGIN_NAMESPACE(std)
*** 125,133 ****
if (__ix < numeric_limits<int>::max())
{
__newsize = __ix + 1;
! try
{ __words = new _Words[__newsize]; }
! catch(...)
{
_M_streambuf_state |= badbit;
if (_M_streambuf_state & _M_exception)
--- 126,134 ----
if (__ix < numeric_limits<int>::max())
{
__newsize = __ix + 1;
! __try
{ __words = new _Words[__newsize]; }
! __catch(...)
{
_M_streambuf_state |= badbit;
if (_M_streambuf_state & _M_exception)
*************** _GLIBCXX_BEGIN_NAMESPACE(std)
*** 170,178 ****
_Callback_list* __p = _M_callbacks;
while (__p)
{
! try
{ (*__p->_M_fn) (__e, *this, __p->_M_index); }
! catch(...)
{ }
__p = __p->_M_next;
}
--- 171,179 ----
_Callback_list* __p = _M_callbacks;
while (__p)
{
! __try
{ (*__p->_M_fn) (__e, *this, __p->_M_index); }
! __catch(...)
{ }
__p = __p->_M_next;
}
Index: src/locale.cc
===================================================================
*** src/locale.cc (revision 143902)
--- src/locale.cc (working copy)
***************
*** 1,5 ****
! // Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
! // 2009
// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
--- 1,5 ----
! // 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
*************** _GLIBCXX_BEGIN_NAMESPACE(std)
*** 256,262 ****
: _M_refcount(__refs), _M_facets(0), _M_facets_size(__imp._M_facets_size),
_M_caches(0), _M_names(0)
{
! try
{
_M_facets = new const facet*[_M_facets_size];
for (size_t __i = 0; __i < _M_facets_size; ++__i)
--- 256,262 ----
: _M_refcount(__refs), _M_facets(0), _M_facets_size(__imp._M_facets_size),
_M_caches(0), _M_names(0)
{
! __try
{
_M_facets = new const facet*[_M_facets_size];
for (size_t __i = 0; __i < _M_facets_size; ++__i)
*************** _GLIBCXX_BEGIN_NAMESPACE(std)
*** 285,291 ****
std::memcpy(_M_names[__l], __imp._M_names[__l], __len);
}
}
! catch(...)
{
this->~_Impl();
__throw_exception_again;
--- 285,291 ----
std::memcpy(_M_names[__l], __imp._M_names[__l], __len);
}
}
! __catch(...)
{
this->~_Impl();
__throw_exception_again;
*************** _GLIBCXX_BEGIN_NAMESPACE(std)
*** 337,347 ****
// New cache array.
const facet** __oldc = _M_caches;
const facet** __newc;
! try
{
__newc = new const facet*[__new_size];
}
! catch(...)
{
delete [] __newf;
__throw_exception_again;
--- 337,347 ----
// New cache array.
const facet** __oldc = _M_caches;
const facet** __newc;
! __try
{
__newc = new const facet*[__new_size];
}
! __catch(...)
{
delete [] __newf;
__throw_exception_again;
Index: src/istream.cc
===================================================================
*** src/istream.cc (revision 143902)
--- src/istream.cc (working copy)
***************
*** 1,6 ****
// Input streams -*- C++ -*-
! // Copyright (C) 2004, 2005 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
--- 1,7 ----
// Input streams -*- C++ -*-
! // 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
*************** _GLIBCXX_BEGIN_NAMESPACE(std)
*** 45,51 ****
sentry __cerb(*this, true);
if (__cerb)
{
! try
{
const int_type __idelim = traits_type::to_int_type(__delim);
const int_type __eof = traits_type::eof();
--- 46,52 ----
sentry __cerb(*this, true);
if (__cerb)
{
! __try
{
const int_type __idelim = traits_type::to_int_type(__delim);
const int_type __eof = traits_type::eof();
*************** _GLIBCXX_BEGIN_NAMESPACE(std)
*** 91,102 ****
else
__err |= ios_base::failbit;
}
! catch(__cxxabiv1::__forced_unwind&)
{
this->_M_setstate(ios_base::badbit);
__throw_exception_again;
}
! catch(...)
{ this->_M_setstate(ios_base::badbit); }
}
// _GLIBCXX_RESOLVE_LIB_DEFECTS
--- 92,103 ----
else
__err |= ios_base::failbit;
}
! __catch(__cxxabiv1::__forced_unwind&)
{
this->_M_setstate(ios_base::badbit);
__throw_exception_again;
}
! __catch(...)
{ this->_M_setstate(ios_base::badbit); }
}
// _GLIBCXX_RESOLVE_LIB_DEFECTS
*************** _GLIBCXX_BEGIN_NAMESPACE(std)
*** 123,129 ****
if (__cerb && __n > 0)
{
ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
! try
{
const char_type __cdelim = traits_type::to_char_type(__delim);
const int_type __eof = traits_type::eof();
--- 124,130 ----
if (__cerb && __n > 0)
{
ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
! __try
{
const char_type __cdelim = traits_type::to_char_type(__delim);
const int_type __eof = traits_type::eof();
*************** _GLIBCXX_BEGIN_NAMESPACE(std)
*** 182,193 ****
__sb->sbumpc();
}
}
! catch(__cxxabiv1::__forced_unwind&)
{
this->_M_setstate(ios_base::badbit);
__throw_exception_again;
}
! catch(...)
{ this->_M_setstate(ios_base::badbit); }
if (__err)
this->setstate(__err);
--- 183,194 ----
__sb->sbumpc();
}
}
! __catch(__cxxabiv1::__forced_unwind&)
{
this->_M_setstate(ios_base::badbit);
__throw_exception_again;
}
! __catch(...)
{ this->_M_setstate(ios_base::badbit); }
if (__err)
this->setstate(__err);
*************** _GLIBCXX_BEGIN_NAMESPACE(std)
*** 211,217 ****
__istream_type::sentry __cerb(__in, false);
if (__cerb)
{
! try
{
// Figure out how many characters to extract.
streamsize __num = __in.width();
--- 212,218 ----
__istream_type::sentry __cerb(__in, false);
if (__cerb)
{
! __try
{
// Figure out how many characters to extract.
streamsize __num = __in.width();
*************** _GLIBCXX_BEGIN_NAMESPACE(std)
*** 261,272 ****
*__s = __char_type();
__in.width(0);
}
! catch(__cxxabiv1::__forced_unwind&)
{
__in._M_setstate(ios_base::badbit);
__throw_exception_again;
}
! catch(...)
{ __in._M_setstate(ios_base::badbit); }
}
if (!__extracted)
--- 262,273 ----
*__s = __char_type();
__in.width(0);
}
! __catch(__cxxabiv1::__forced_unwind&)
{
__in._M_setstate(ios_base::badbit);
__throw_exception_again;
}
! __catch(...)
{ __in._M_setstate(ios_base::badbit); }
}
if (!__extracted)
*************** _GLIBCXX_BEGIN_NAMESPACE(std)
*** 294,300 ****
__istream_type::sentry __cerb(__in, false);
if (__cerb)
{
! try
{
__str.erase();
const streamsize __w = __in.width();
--- 295,301 ----
__istream_type::sentry __cerb(__in, false);
if (__cerb)
{
! __try
{
__str.erase();
const streamsize __w = __in.width();
*************** _GLIBCXX_BEGIN_NAMESPACE(std)
*** 336,347 ****
__err |= ios_base::eofbit;
__in.width(0);
}
! catch(__cxxabiv1::__forced_unwind&)
{
__in._M_setstate(ios_base::badbit);
__throw_exception_again;
}
! catch(...)
{
// _GLIBCXX_RESOLVE_LIB_DEFECTS
// 91. Description of operator>> and getline() for string<>
--- 337,348 ----
__err |= ios_base::eofbit;
__in.width(0);
}
! __catch(__cxxabiv1::__forced_unwind&)
{
__in._M_setstate(ios_base::badbit);
__throw_exception_again;
}
! __catch(...)
{
// _GLIBCXX_RESOLVE_LIB_DEFECTS
// 91. Description of operator>> and getline() for string<>
*************** _GLIBCXX_BEGIN_NAMESPACE(std)
*** 376,382 ****
__istream_type::sentry __cerb(__in, true);
if (__cerb)
{
! try
{
__str.erase();
const __int_type __idelim = __traits_type::to_int_type(__delim);
--- 377,383 ----
__istream_type::sentry __cerb(__in, true);
if (__cerb)
{
! __try
{
__str.erase();
const __int_type __idelim = __traits_type::to_int_type(__delim);
*************** _GLIBCXX_BEGIN_NAMESPACE(std)
*** 421,432 ****
else
__err |= ios_base::failbit;
}
! catch(__cxxabiv1::__forced_unwind&)
{
__in._M_setstate(ios_base::badbit);
__throw_exception_again;
}
! catch(...)
{
// _GLIBCXX_RESOLVE_LIB_DEFECTS
// 91. Description of operator>> and getline() for string<>
--- 422,433 ----
else
__err |= ios_base::failbit;
}
! __catch(__cxxabiv1::__forced_unwind&)
{
__in._M_setstate(ios_base::badbit);
__throw_exception_again;
}
! __catch(...)
{
// _GLIBCXX_RESOLVE_LIB_DEFECTS
// 91. Description of operator>> and getline() for string<>
*************** _GLIBCXX_BEGIN_NAMESPACE(std)
*** 452,458 ****
sentry __cerb(*this, true);
if (__cerb)
{
! try
{
const int_type __idelim = traits_type::to_int_type(__delim);
const int_type __eof = traits_type::eof();
--- 453,459 ----
sentry __cerb(*this, true);
if (__cerb)
{
! __try
{
const int_type __idelim = traits_type::to_int_type(__delim);
const int_type __eof = traits_type::eof();
*************** _GLIBCXX_BEGIN_NAMESPACE(std)
*** 498,509 ****
else
__err |= ios_base::failbit;
}
! catch(__cxxabiv1::__forced_unwind&)
{
this->_M_setstate(ios_base::badbit);
__throw_exception_again;
}
! catch(...)
{ this->_M_setstate(ios_base::badbit); }
}
// _GLIBCXX_RESOLVE_LIB_DEFECTS
--- 499,510 ----
else
__err |= ios_base::failbit;
}
! __catch(__cxxabiv1::__forced_unwind&)
{
this->_M_setstate(ios_base::badbit);
__throw_exception_again;
}
! __catch(...)
{ this->_M_setstate(ios_base::badbit); }
}
// _GLIBCXX_RESOLVE_LIB_DEFECTS
*************** _GLIBCXX_BEGIN_NAMESPACE(std)
*** 530,536 ****
if (__cerb && __n > 0)
{
ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
! try
{
const char_type __cdelim = traits_type::to_char_type(__delim);
const int_type __eof = traits_type::eof();
--- 531,537 ----
if (__cerb && __n > 0)
{
ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
! __try
{
const char_type __cdelim = traits_type::to_char_type(__delim);
const int_type __eof = traits_type::eof();
*************** _GLIBCXX_BEGIN_NAMESPACE(std)
*** 589,600 ****
__sb->sbumpc();
}
}
! catch(__cxxabiv1::__forced_unwind&)
{
this->_M_setstate(ios_base::badbit);
__throw_exception_again;
}
! catch(...)
{ this->_M_setstate(ios_base::badbit); }
if (__err)
this->setstate(__err);
--- 590,601 ----
__sb->sbumpc();
}
}
! __catch(__cxxabiv1::__forced_unwind&)
{
this->_M_setstate(ios_base::badbit);
__throw_exception_again;
}
! __catch(...)
{ this->_M_setstate(ios_base::badbit); }
if (__err)
this->setstate(__err);
*************** _GLIBCXX_BEGIN_NAMESPACE(std)
*** 622,628 ****
__istream_type::sentry __cerb(__in, true);
if (__cerb)
{
! try
{
__str.erase();
const __int_type __idelim = __traits_type::to_int_type(__delim);
--- 623,629 ----
__istream_type::sentry __cerb(__in, true);
if (__cerb)
{
! __try
{
__str.erase();
const __int_type __idelim = __traits_type::to_int_type(__delim);
*************** _GLIBCXX_BEGIN_NAMESPACE(std)
*** 667,678 ****
else
__err |= ios_base::failbit;
}
! catch(__cxxabiv1::__forced_unwind&)
{
__in._M_setstate(ios_base::badbit);
__throw_exception_again;
}
! catch(...)
{
// _GLIBCXX_RESOLVE_LIB_DEFECTS
// 91. Description of operator>> and getline() for string<>
--- 668,679 ----
else
__err |= ios_base::failbit;
}
! __catch(__cxxabiv1::__forced_unwind&)
{
__in._M_setstate(ios_base::badbit);
__throw_exception_again;
}
! __catch(...)
{
// _GLIBCXX_RESOLVE_LIB_DEFECTS
// 91. Description of operator>> and getline() for string<>
Index: src/thread.cc
===================================================================
*** src/thread.cc (revision 143902)
--- src/thread.cc (working copy)
*************** namespace std
*** 44,54 ****
__thread_data_ptr __local_thread_data;
__local_thread_data.swap(__t->_M_this_ptr);
! try
{
__local_thread_data->_M_run();
}
! catch(...)
{
std::terminate();
}
--- 44,54 ----
__thread_data_ptr __local_thread_data;
__local_thread_data.swap(__t->_M_this_ptr);
! __try
{
__local_thread_data->_M_run();
}
! __catch(...)
{
std::terminate();
}
Index: src/compatibility.cc
===================================================================
*** src/compatibility.cc (revision 143902)
--- src/compatibility.cc (working copy)
***************
*** 1,6 ****
// Compatibility symbols for previous versions -*- C++ -*-
! // Copyright (C) 2005, 2006, 2009
// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
--- 1,6 ----
// Compatibility symbols for previous versions -*- C++ -*-
! // 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
*************** _GLIBCXX_BEGIN_NAMESPACE(std)
*** 70,76 ****
if (__cerb && __n > 0)
{
ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
! try
{
const int_type __eof = traits_type::eof();
__streambuf_type* __sb = this->rdbuf();
--- 70,76 ----
if (__cerb && __n > 0)
{
ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
! __try
{
const int_type __eof = traits_type::eof();
__streambuf_type* __sb = this->rdbuf();
*************** _GLIBCXX_BEGIN_NAMESPACE(std)
*** 115,126 ****
if (traits_type::eq_int_type(__c, __eof))
__err |= ios_base::eofbit;
}
! catch(__cxxabiv1::__forced_unwind&)
{
this->_M_setstate(ios_base::badbit);
__throw_exception_again;
}
! catch(...)
{ this->_M_setstate(ios_base::badbit); }
if (__err)
this->setstate(__err);
--- 115,126 ----
if (traits_type::eq_int_type(__c, __eof))
__err |= ios_base::eofbit;
}
! __catch(__cxxabiv1::__forced_unwind&)
{
this->_M_setstate(ios_base::badbit);
__throw_exception_again;
}
! __catch(...)
{ this->_M_setstate(ios_base::badbit); }
if (__err)
this->setstate(__err);
*************** _GLIBCXX_BEGIN_NAMESPACE(std)
*** 142,148 ****
if (__cerb && __n > 0)
{
ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
! try
{
const int_type __eof = traits_type::eof();
__streambuf_type* __sb = this->rdbuf();
--- 142,148 ----
if (__cerb && __n > 0)
{
ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
! __try
{
const int_type __eof = traits_type::eof();
__streambuf_type* __sb = this->rdbuf();
*************** _GLIBCXX_BEGIN_NAMESPACE(std)
*** 186,197 ****
if (traits_type::eq_int_type(__c, __eof))
__err |= ios_base::eofbit;
}
! catch(__cxxabiv1::__forced_unwind&)
{
this->_M_setstate(ios_base::badbit);
__throw_exception_again;
}
! catch(...)
{ this->_M_setstate(ios_base::badbit); }
if (__err)
this->setstate(__err);
--- 186,197 ----
if (traits_type::eq_int_type(__c, __eof))
__err |= ios_base::eofbit;
}
! __catch(__cxxabiv1::__forced_unwind&)
{
this->_M_setstate(ios_base::badbit);
__throw_exception_again;
}
! __catch(...)
{ this->_M_setstate(ios_base::badbit); }
if (__err)
this->setstate(__err);
Index: src/bitmap_allocator.cc
===================================================================
*** src/bitmap_allocator.cc (revision 143902)
--- src/bitmap_allocator.cc (working copy)
***************
*** 1,6 ****
// Bitmap Allocator. Out of line function definitions. -*- C++ -*-
! // Copyright (C) 2004, 2005, 2006 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
--- 1,7 ----
// Bitmap Allocator. Out of line function definitions. -*- C++ -*-
! // 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
*************** _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
*** 75,86 ****
{
size_t* __ret = 0;
--__ctr;
! try
{
__ret = reinterpret_cast<size_t*>
(::operator new(__sz + sizeof(size_t)));
}
! catch(...)
{
this->_M_clear();
}
--- 76,87 ----
{
size_t* __ret = 0;
--__ctr;
! __try
{
__ret = reinterpret_cast<size_t*>
(::operator new(__sz + sizeof(size_t)));
}
! __catch(...)
{
this->_M_clear();
}
Index: src/ios_init.cc
===================================================================
*** src/ios_init.cc (revision 143902)
--- src/ios_init.cc (working copy)
***************
*** 1,6 ****
// Iostreams base classes -*- C++ -*-
! // Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
--- 1,7 ----
// Iostreams base classes -*- C++ -*-
! // 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
*************** _GLIBCXX_BEGIN_NAMESPACE(std)
*** 129,135 ****
if (__gnu_cxx::__exchange_and_add_dispatch(&_S_refcount, -1) == 2)
{
// Catch any exceptions thrown by basic_ostream::flush()
! try
{
// Flush standard output streams as required by 27.4.2.1.6
cout.flush();
--- 130,136 ----
if (__gnu_cxx::__exchange_and_add_dispatch(&_S_refcount, -1) == 2)
{
// Catch any exceptions thrown by basic_ostream::flush()
! __try
{
// Flush standard output streams as required by 27.4.2.1.6
cout.flush();
*************** _GLIBCXX_BEGIN_NAMESPACE(std)
*** 142,148 ****
wclog.flush();
#endif
}
! catch(...)
{ }
}
}
--- 143,149 ----
wclog.flush();
#endif
}
! __catch(...)
{ }
}
}
Index: include/debug/deque
===================================================================
*** include/debug/deque (revision 143902)
--- include/debug/deque (working copy)
***************
*** 1,6 ****
// Debugging deque implementation -*- C++ -*-
! // Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008
// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
--- 1,6 ----
// Debugging deque implementation -*- C++ -*-
! // 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
*************** namespace __debug
*** 416,427 ****
iterator __victim = __position++;
__victim._M_invalidate();
}
! try
{
return iterator(_Base::erase(__first.base(), __last.base()),
this);
}
! catch(...)
{
this->_M_revalidate_singular();
__throw_exception_again;
--- 416,427 ----
iterator __victim = __position++;
__victim._M_invalidate();
}
! __try
{
return iterator(_Base::erase(__first.base(), __last.base()),
this);
}
! __catch(...)
{
this->_M_revalidate_singular();
__throw_exception_again;
Index: include/debug/list
===================================================================
*** include/debug/list (revision 143902)
--- include/debug/list (working copy)
***************
*** 1,6 ****
// Debugging list implementation -*- C++ -*-
! // Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008
// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
--- 1,6 ----
// Debugging list implementation -*- C++ -*-
! // 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
*************** namespace __debug
*** 256,266 ****
__real_victim._M_invalidate();
}
! try
{
_Base::resize(__sz, __c);
}
! catch(...)
{
this->_M_revalidate_singular();
__throw_exception_again;
--- 256,266 ----
__real_victim._M_invalidate();
}
! __try
{
_Base::resize(__sz, __c);
}
! __catch(...)
{
this->_M_revalidate_singular();
__throw_exception_again;
Index: include/tr1_impl/hashtable
===================================================================
*** include/tr1_impl/hashtable (revision 143902)
--- include/tr1_impl/hashtable (working copy)
***************
*** 1,6 ****
// Internal header for TR1 unordered_set and unordered_map -*- C++ -*-
! // Copyright (C) 2007, 2008 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
--- 1,6 ----
// Internal header for TR1 unordered_set and unordered_map -*- C++ -*-
! // 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
*************** _GLIBCXX_BEGIN_NAMESPACE_TR1
*** 482,488 ****
_M_allocate_node(const value_type& __v)
{
_Node* __n = _M_node_allocator.allocate(1);
! try
{
#ifdef _GLIBCXX_INCLUDE_AS_CXX0X
_M_node_allocator.construct(__n, __v);
--- 482,488 ----
_M_allocate_node(const value_type& __v)
{
_Node* __n = _M_node_allocator.allocate(1);
! __try
{
#ifdef _GLIBCXX_INCLUDE_AS_CXX0X
_M_node_allocator.construct(__n, __v);
*************** _GLIBCXX_BEGIN_NAMESPACE_TR1
*** 492,498 ****
__n->_M_next = 0;
return __n;
}
! catch(...)
{
_M_node_allocator.deallocate(__n, 1);
__throw_exception_again;
--- 492,498 ----
__n->_M_next = 0;
return __n;
}
! __catch(...)
{
_M_node_allocator.deallocate(__n, 1);
__throw_exception_again;
*************** _GLIBCXX_BEGIN_NAMESPACE_TR1
*** 624,635 ****
__distance_fw(__f,
__l)));
_M_buckets = _M_allocate_buckets(_M_bucket_count);
! try
{
for (; __f != __l; ++__f)
this->insert(*__f);
}
! catch(...)
{
clear();
_M_deallocate_buckets(_M_buckets, _M_bucket_count);
--- 624,635 ----
__distance_fw(__f,
__l)));
_M_buckets = _M_allocate_buckets(_M_bucket_count);
! __try
{
for (; __f != __l; ++__f)
this->insert(*__f);
}
! __catch(...)
{
clear();
_M_deallocate_buckets(_M_buckets, _M_bucket_count);
*************** _GLIBCXX_BEGIN_NAMESPACE_TR1
*** 654,660 ****
_M_rehash_policy(__ht._M_rehash_policy)
{
_M_buckets = _M_allocate_buckets(_M_bucket_count);
! try
{
for (size_type __i = 0; __i < __ht._M_bucket_count; ++__i)
{
--- 654,660 ----
_M_rehash_policy(__ht._M_rehash_policy)
{
_M_buckets = _M_allocate_buckets(_M_bucket_count);
! __try
{
for (size_type __i = 0; __i < __ht._M_bucket_count; ++__i)
{
*************** _GLIBCXX_BEGIN_NAMESPACE_TR1
*** 669,675 ****
}
}
}
! catch(...)
{
clear();
_M_deallocate_buckets(_M_buckets, _M_bucket_count);
--- 669,675 ----
}
}
}
! __catch(...)
{
clear();
_M_deallocate_buckets(_M_buckets, _M_bucket_count);
*************** _GLIBCXX_BEGIN_NAMESPACE_TR1
*** 946,952 ****
// do a rehash if the allocation throws.
_Node* __new_node = _M_allocate_node(__v);
! try
{
if (__do_rehash.first)
{
--- 946,952 ----
// do a rehash if the allocation throws.
_Node* __new_node = _M_allocate_node(__v);
! __try
{
if (__do_rehash.first)
{
*************** _GLIBCXX_BEGIN_NAMESPACE_TR1
*** 961,967 ****
++_M_element_count;
return iterator(__new_node, _M_buckets + __n);
}
! catch(...)
{
_M_deallocate_node(__new_node);
__throw_exception_again;
--- 961,967 ----
++_M_element_count;
return iterator(__new_node, _M_buckets + __n);
}
! __catch(...)
{
_M_deallocate_node(__new_node);
__throw_exception_again;
*************** _GLIBCXX_BEGIN_NAMESPACE_TR1
*** 1239,1245 ****
_M_rehash(size_type __n)
{
_Node** __new_array = _M_allocate_buckets(__n);
! try
{
for (size_type __i = 0; __i < _M_bucket_count; ++__i)
while (_Node* __p = _M_buckets[__i])
--- 1239,1245 ----
_M_rehash(size_type __n)
{
_Node** __new_array = _M_allocate_buckets(__n);
! __try
{
for (size_type __i = 0; __i < _M_bucket_count; ++__i)
while (_Node* __p = _M_buckets[__i])
*************** _GLIBCXX_BEGIN_NAMESPACE_TR1
*** 1253,1259 ****
_M_bucket_count = __n;
_M_buckets = __new_array;
}
! catch(...)
{
// A failure here means that a hash function threw an exception.
// We can't restore the previous state without calling the hash
--- 1253,1259 ----
_M_bucket_count = __n;
_M_buckets = __new_array;
}
! __catch(...)
{
// A failure here means that a hash function threw an exception.
// We can't restore the previous state without calling the hash
Index: include/std/bitset
===================================================================
*** include/std/bitset (revision 143902)
--- include/std/bitset (working copy)
***************
*** 1,6 ****
// <bitset> -*- C++ -*-
! // Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
--- 1,6 ----
// <bitset> -*- C++ -*-
! // 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
*************** _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GL
*** 1326,1332 ****
typename __istream_type::sentry __sentry(__is);
if (__sentry)
{
! try
{
for (size_t __i = _Nb; __i > 0; --__i)
{
--- 1326,1332 ----
typename __istream_type::sentry __sentry(__is);
if (__sentry)
{
! __try
{
for (size_t __i = _Nb; __i > 0; --__i)
{
*************** _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GL
*** 1355,1366 ****
}
}
}
! catch(__cxxabiv1::__forced_unwind&)
{
__is._M_setstate(__ios_base::badbit);
__throw_exception_again;
}
! catch(...)
{ __is._M_setstate(__ios_base::badbit); }
}
--- 1355,1366 ----
}
}
}
! __catch(__cxxabiv1::__forced_unwind&)
{
__is._M_setstate(__ios_base::badbit);
__throw_exception_again;
}
! __catch(...)
{ __is._M_setstate(__ios_base::badbit); }
}
Index: include/ext/pb_ds/detail/resize_policy/hash_load_check_resize_trigger_imp.hpp
===================================================================
*** include/ext/pb_ds/detail/resize_policy/hash_load_check_resize_trigger_imp.hpp (revision 143902)
--- include/ext/pb_ds/detail/resize_policy/hash_load_check_resize_trigger_imp.hpp (working copy)
***************
*** 1,6 ****
// -*- C++ -*-
! // Copyright (C) 2005, 2006, 2007 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
--- 1,6 ----
// -*- C++ -*-
! // 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
*************** set_loads(std::pair<float, float> load_p
*** 259,271 ****
const size_type old_next_grow_size = m_next_grow_size;
const bool old_resize_needed = m_resize_needed;
! try
{
m_load_min = load_pair.first;
m_load_max = load_pair.second;
do_resize(static_cast<size_type>(size_base::get_size() / ((m_load_min + m_load_max) / 2)));
}
! catch(...)
{
m_load_min = old_load_min;
m_load_max = old_load_max;
--- 259,271 ----
const size_type old_next_grow_size = m_next_grow_size;
const bool old_resize_needed = m_resize_needed;
! __try
{
m_load_min = load_pair.first;
m_load_max = load_pair.second;
do_resize(static_cast<size_type>(size_base::get_size() / ((m_load_min + m_load_max) / 2)));
}
! __catch(...)
{
m_load_min = old_load_min;
m_load_max = old_load_max;
Index: include/ext/pb_ds/detail/resize_policy/hash_standard_resize_policy_imp.hpp
===================================================================
*** include/ext/pb_ds/detail/resize_policy/hash_standard_resize_policy_imp.hpp (revision 143902)
--- include/ext/pb_ds/detail/resize_policy/hash_standard_resize_policy_imp.hpp (working copy)
***************
*** 1,6 ****
// -*- C++ -*-
! // Copyright (C) 2005, 2006, 2007 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
--- 1,6 ----
// -*- C++ -*-
! // 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
*************** resize(size_type new_size)
*** 205,220 ****
--actual_size;
const size_type old_size = m_size;
! try
{
do_resize(actual_size - 1);
}
! catch(insert_error& )
{
m_size = old_size;
__throw_resize_error();
}
! catch(...)
{
m_size = old_size;
__throw_exception_again;
--- 205,220 ----
--actual_size;
const size_type old_size = m_size;
! __try
{
do_resize(actual_size - 1);
}
! __catch(insert_error& )
{
m_size = old_size;
__throw_resize_error();
}
! __catch(...)
{
m_size = old_size;
__throw_exception_again;
Index: include/ext/pb_ds/detail/cc_hash_table_map_/resize_fn_imps.hpp
===================================================================
*** include/ext/pb_ds/detail/cc_hash_table_map_/resize_fn_imps.hpp (revision 143902)
--- include/ext/pb_ds/detail/cc_hash_table_map_/resize_fn_imps.hpp (working copy)
***************
*** 1,6 ****
// -*- C++ -*-
! // Copyright (C) 2005, 2006 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
--- 1,6 ----
// -*- C++ -*-
! // 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
*************** do_resize_if_needed_no_throw()
*** 69,79 ****
if (!resize_base::is_resize_needed())
return;
! try
{
resize_imp(resize_base::get_new_size(m_num_e, m_num_used_e));
}
! catch(...)
{ }
_GLIBCXX_DEBUG_ONLY(assert_valid();)
--- 69,79 ----
if (!resize_base::is_resize_needed())
return;
! __try
{
resize_imp(resize_base::get_new_size(m_num_e, m_num_used_e));
}
! __catch(...)
{ }
_GLIBCXX_DEBUG_ONLY(assert_valid();)
*************** resize_imp(size_type new_size)
*** 94,106 ****
// Following line might throw an exception.
ranged_hash_fn_base::notify_resized(new_size);
! try
{
// Following line might throw an exception.
a_p_entries_resized = s_entry_pointer_allocator.allocate(new_size);
m_num_e = new_size;
}
! catch(...)
{
ranged_hash_fn_base::notify_resized(old_size);
__throw_exception_again;
--- 94,106 ----
// Following line might throw an exception.
ranged_hash_fn_base::notify_resized(new_size);
! __try
{
// Following line might throw an exception.
a_p_entries_resized = s_entry_pointer_allocator.allocate(new_size);
m_num_e = new_size;
}
! __catch(...)
{
ranged_hash_fn_base::notify_resized(old_size);
__throw_exception_again;
Index: include/ext/pb_ds/detail/cc_hash_table_map_/constructor_destructor_fn_imps.hpp
===================================================================
*** include/ext/pb_ds/detail/cc_hash_table_map_/constructor_destructor_fn_imps.hpp (revision 143902)
--- include/ext/pb_ds/detail/cc_hash_table_map_/constructor_destructor_fn_imps.hpp (working copy)
***************
*** 1,6 ****
// -*- C++ -*-
! // Copyright (C) 2005, 2006 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
--- 1,6 ----
// -*- C++ -*-
! // 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
*************** PB_DS_CLASS_NAME(const PB_DS_CLASS_C_DEC
*** 139,149 ****
{
initialize();
_GLIBCXX_DEBUG_ONLY(PB_DS_CLASS_C_DEC::assert_valid();)
! try
{
copy_from_range(other.begin(), other.end());
}
! catch(...)
{
deallocate_all();
__throw_exception_again;
--- 139,149 ----
{
initialize();
_GLIBCXX_DEBUG_ONLY(PB_DS_CLASS_C_DEC::assert_valid();)
! __try
{
copy_from_range(other.begin(), other.end());
}
! __catch(...)
{
deallocate_all();
__throw_exception_again;
Index: include/ext/pb_ds/detail/pat_trie_/split_join_branch_bag.hpp
===================================================================
*** include/ext/pb_ds/detail/pat_trie_/split_join_branch_bag.hpp (revision 143902)
--- include/ext/pb_ds/detail/pat_trie_/split_join_branch_bag.hpp (working copy)
***************
*** 1,6 ****
// -*- C++ -*-
! // Copyright (C) 2005, 2006 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
--- 1,6 ----
// -*- C++ -*-
! // 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
*************** public:
*** 60,70 ****
add_branch()
{
internal_node_pointer p_nd = s_internal_node_allocator.allocate(1);
! try
{
m_bag.push_back(p_nd);
}
! catch(...)
{
s_internal_node_allocator.deallocate(p_nd, 1);
__throw_exception_again;
--- 60,70 ----
add_branch()
{
internal_node_pointer p_nd = s_internal_node_allocator.allocate(1);
! __try
{
m_bag.push_back(p_nd);
}
! __catch(...)
{
s_internal_node_allocator.deallocate(p_nd, 1);
__throw_exception_again;
Index: include/ext/pb_ds/detail/pat_trie_/constructors_destructor_fn_imps.hpp
===================================================================
*** include/ext/pb_ds/detail/pat_trie_/constructors_destructor_fn_imps.hpp (revision 143902)
--- include/ext/pb_ds/detail/pat_trie_/constructors_destructor_fn_imps.hpp (working copy)
***************
*** 1,6 ****
// -*- C++ -*-
! // Copyright (C) 2005, 2006 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
--- 1,6 ----
// -*- C++ -*-
! // 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
*************** PB_DS_CLASS_NAME(const PB_DS_CLASS_C_DEC
*** 96,106 ****
_GLIBCXX_DEBUG_ONLY(assert_valid();)
return;
}
! try
{
m_p_head->m_p_parent = recursive_copy_node(other.m_p_head->m_p_parent);
}
! catch(...)
{
s_head_allocator.deallocate(m_p_head, 1);
__throw_exception_again;
--- 96,106 ----
_GLIBCXX_DEBUG_ONLY(assert_valid();)
return;
}
! __try
{
m_p_head->m_p_parent = recursive_copy_node(other.m_p_head->m_p_parent);
}
! __catch(...)
{
s_head_allocator.deallocate(m_p_head, 1);
__throw_exception_again;
*************** recursive_copy_node(const_node_pointer p
*** 193,205 ****
p_other_internal_nd->begin();
internal_node_pointer p_ret;
! 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(...)
{
while (child_i-- > 0)
clear_imp(a_p_children[child_i]);
--- 193,205 ----
p_other_internal_nd->begin();
internal_node_pointer p_ret;
! __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(...)
{
while (child_i-- > 0)
clear_imp(a_p_children[child_i]);
Index: include/ext/pb_ds/detail/bin_search_tree_/constructors_destructor_fn_imps.hpp
===================================================================
*** include/ext/pb_ds/detail/bin_search_tree_/constructors_destructor_fn_imps.hpp (revision 143902)
--- include/ext/pb_ds/detail/bin_search_tree_/constructors_destructor_fn_imps.hpp (working copy)
***************
*** 1,6 ****
// -*- C++ -*-
! // Copyright (C) 2005, 2006 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
--- 1,6 ----
// -*- C++ -*-
! // 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
*************** PB_DS_CLASS_NAME(const PB_DS_CLASS_C_DEC
*** 95,101 ****
m_size = other.m_size;
_GLIBCXX_DEBUG_ONLY(other.structure_only_assert_valid();)
! 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)
--- 95,101 ----
m_size = other.m_size;
_GLIBCXX_DEBUG_ONLY(other.structure_only_assert_valid();)
! __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)
*************** PB_DS_CLASS_NAME(const PB_DS_CLASS_C_DEC
*** 103,109 ****
m_size = other.m_size;
initialize_min_max();
}
! catch(...)
{
_GLIBCXX_DEBUG_ONLY(debug_base::clear();)
s_node_allocator.deallocate(m_p_head, 1);
--- 103,109 ----
m_size = other.m_size;
initialize_min_max();
}
! __catch(...)
{
_GLIBCXX_DEBUG_ONLY(debug_base::clear();)
s_node_allocator.deallocate(m_p_head, 1);
*************** recursive_copy_node(const node_pointer p
*** 163,173 ****
return (NULL);
node_pointer p_ret = s_node_allocator.allocate(1);
! try
{
new (p_ret) node(*p_nd);
}
! catch(...)
{
s_node_allocator.deallocate(p_ret, 1);
__throw_exception_again;
--- 163,173 ----
return (NULL);
node_pointer p_ret = s_node_allocator.allocate(1);
! __try
{
new (p_ret) node(*p_nd);
}
! __catch(...)
{
s_node_allocator.deallocate(p_ret, 1);
__throw_exception_again;
*************** recursive_copy_node(const node_pointer p
*** 175,186 ****
p_ret->m_p_left = p_ret->m_p_right = NULL;
! 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(...)
{
clear_imp(p_ret);
__throw_exception_again;
--- 175,186 ----
p_ret->m_p_left = p_ret->m_p_right = NULL;
! __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(...)
{
clear_imp(p_ret);
__throw_exception_again;
Index: include/ext/pb_ds/detail/gp_hash_table_map_/resize_fn_imps.hpp
===================================================================
*** include/ext/pb_ds/detail/gp_hash_table_map_/resize_fn_imps.hpp (revision 143902)
--- include/ext/pb_ds/detail/gp_hash_table_map_/resize_fn_imps.hpp (working copy)
***************
*** 1,6 ****
// -*- C++ -*-
! // Copyright (C) 2005, 2006 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
--- 1,6 ----
// -*- C++ -*-
! // 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
*************** do_resize_if_needed_no_throw()
*** 69,79 ****
if (!resize_base::is_resize_needed())
return;
! try
{
resize_imp(resize_base::get_new_size(m_num_e, m_num_used_e));
}
! catch(...)
{ }
_GLIBCXX_DEBUG_ONLY(assert_valid();)
--- 69,79 ----
if (!resize_base::is_resize_needed())
return;
! __try
{
resize_imp(resize_base::get_new_size(m_num_e, m_num_used_e));
}
! __catch(...)
{ }
_GLIBCXX_DEBUG_ONLY(assert_valid();)
*************** resize_imp(size_type new_size)
*** 104,114 ****
for (size_type i = 0; i < m_num_e; ++i)
a_entries_resized[i].m_stat = empty_entry_status;
! try
{
resize_imp(a_entries_resized, old_size);
}
! catch(...)
{
erase_all_valid_entries(a_entries_resized, new_size);
m_num_e = old_size;
--- 104,114 ----
for (size_type i = 0; i < m_num_e; ++i)
a_entries_resized[i].m_stat = empty_entry_status;
! __try
{
resize_imp(a_entries_resized, old_size);
}
! __catch(...)
{
erase_all_valid_entries(a_entries_resized, new_size);
m_num_e = old_size;
Index: include/ext/pb_ds/detail/gp_hash_table_map_/constructor_destructor_fn_imps.hpp
===================================================================
*** include/ext/pb_ds/detail/gp_hash_table_map_/constructor_destructor_fn_imps.hpp (revision 143902)
--- include/ext/pb_ds/detail/gp_hash_table_map_/constructor_destructor_fn_imps.hpp (working copy)
***************
*** 1,6 ****
// -*- C++ -*-
! // Copyright (C) 2005, 2006 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
--- 1,6 ----
// -*- C++ -*-
! // 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
*************** PB_DS_CLASS_NAME(const PB_DS_CLASS_C_DEC
*** 152,158 ****
for (size_type i = 0; i < m_num_e; ++i)
m_entries[i].m_stat = (entry_status)empty_entry_status;
! try
{
for (size_type i = 0; i < m_num_e; ++i)
{
--- 152,158 ----
for (size_type i = 0; i < m_num_e; ++i)
m_entries[i].m_stat = (entry_status)empty_entry_status;
! __try
{
for (size_type i = 0; i < m_num_e; ++i)
{
*************** PB_DS_CLASS_NAME(const PB_DS_CLASS_C_DEC
*** 161,167 ****
new (m_entries + i) entry(other.m_entries[i]);
}
}
! catch(...)
{
deallocate_all();
__throw_exception_again;
--- 161,167 ----
new (m_entries + i) entry(other.m_entries[i]);
}
}
! __catch(...)
{
deallocate_all();
__throw_exception_again;
Index: include/ext/pb_ds/detail/binary_heap_/constructors_destructor_fn_imps.hpp
===================================================================
*** include/ext/pb_ds/detail/binary_heap_/constructors_destructor_fn_imps.hpp (revision 143902)
--- include/ext/pb_ds/detail/binary_heap_/constructors_destructor_fn_imps.hpp (working copy)
***************
*** 1,6 ****
// -*- C++ -*-
! // Copyright (C) 2005, 2006 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
--- 1,6 ----
// -*- C++ -*-
! // 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
*************** binary_heap_(const PB_DS_CLASS_C_DEC& ot
*** 109,115 ****
const_iterator first_it = other.begin();
const_iterator last_it = other.end();
! try
{
while (first_it != last_it)
{
--- 109,115 ----
const_iterator first_it = other.begin();
const_iterator last_it = other.end();
! __try
{
while (first_it != last_it)
{
*************** binary_heap_(const PB_DS_CLASS_C_DEC& ot
*** 117,123 ****
++first_it;
}
}
! catch(...)
{
for (size_type i = 0; i < m_size; ++i)
erase_at(m_a_entries, i, s_no_throw_copies_ind);
--- 117,123 ----
++first_it;
}
}
! __catch(...)
{
for (size_type i = 0; i < m_size; ++i)
erase_at(m_a_entries, i, s_no_throw_copies_ind);
Index: include/ext/pb_ds/detail/binary_heap_/erase_fn_imps.hpp
===================================================================
*** include/ext/pb_ds/detail/binary_heap_/erase_fn_imps.hpp (revision 143902)
--- include/ext/pb_ds/detail/binary_heap_/erase_fn_imps.hpp (working copy)
***************
*** 1,6 ****
// -*- C++ -*-
! // Copyright (C) 2005, 2006 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
--- 1,6 ----
// -*- C++ -*-
! // 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
*************** clear()
*** 52,58 ****
for (size_type i = 0; i < m_size; ++i)
erase_at(m_a_entries, i, s_no_throw_copies_ind);
! try
{
const size_type actual_size = resize_policy::get_new_size_for_arbitrary(0);
--- 52,58 ----
for (size_type i = 0; i < m_size; ++i)
erase_at(m_a_entries, i, s_no_throw_copies_ind);
! __try
{
const size_type actual_size = resize_policy::get_new_size_for_arbitrary(0);
*************** clear()
*** 66,72 ****
m_a_entries = a_entries;
}
! catch(...)
{ }
m_size = 0;
--- 66,72 ----
m_a_entries = a_entries;
}
! __catch(...)
{ }
m_size = 0;
*************** erase_if(Pred pred)
*** 135,141 ****
for (size_type i = left; i < m_size; ++i)
erase_at(m_a_entries, i, s_no_throw_copies_ind);
! try
{
const size_type actual_size =
resize_policy::get_new_size_for_arbitrary(left);
--- 135,141 ----
for (size_type i = left; i < m_size; ++i)
erase_at(m_a_entries, i, s_no_throw_copies_ind);
! __try
{
const size_type actual_size =
resize_policy::get_new_size_for_arbitrary(left);
*************** erase_if(Pred pred)
*** 150,156 ****
resize_policy::notify_arbitrary(m_actual_size);
}
! catch(...)
{ };
m_size = left;
--- 150,156 ----
resize_policy::notify_arbitrary(m_actual_size);
}
! __catch(...)
{ };
m_size = left;
*************** resize_for_erase_if_needed()
*** 197,203 ****
if (!resize_policy::resize_needed_for_shrink(m_size))
return;
! try
{
const size_type new_actual_size =
resize_policy::get_new_size_for_shrink();
--- 197,203 ----
if (!resize_policy::resize_needed_for_shrink(m_size))
return;
! __try
{
const size_type new_actual_size =
resize_policy::get_new_size_for_shrink();
*************** resize_for_erase_if_needed()
*** 215,221 ****
m_a_entries = a_new_entries;
}
! catch(...)
{ }
}
--- 215,221 ----
m_a_entries = a_new_entries;
}
! __catch(...)
{ }
}
Index: include/ext/pb_ds/detail/binary_heap_/split_join_fn_imps.hpp
===================================================================
*** include/ext/pb_ds/detail/binary_heap_/split_join_fn_imps.hpp (revision 143902)
--- include/ext/pb_ds/detail/binary_heap_/split_join_fn_imps.hpp (working copy)
***************
*** 1,6 ****
// -*- C++ -*-
! // Copyright (C) 2005, 2006 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
--- 1,6 ----
// -*- C++ -*-
! // 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
*************** split(Pred pred, PB_DS_CLASS_C_DEC& othe
*** 77,89 ****
entry_pointer a_entries = NULL;
entry_pointer a_other_entries = NULL;
! try
{
a_entries = s_entry_allocator.allocate(actual_size);
a_other_entries = s_entry_allocator.allocate(other_actual_size);
}
! catch(...)
{
if (a_entries != NULL)
s_entry_allocator.deallocate(a_entries, actual_size);
--- 77,89 ----
entry_pointer a_entries = NULL;
entry_pointer a_other_entries = NULL;
! __try
{
a_entries = s_entry_allocator.allocate(actual_size);
a_other_entries = s_entry_allocator.allocate(other_actual_size);
}
! __catch(...)
{
if (a_entries != NULL)
s_entry_allocator.deallocate(a_entries, actual_size);
*************** join(PB_DS_CLASS_C_DEC& other)
*** 137,148 ****
entry_pointer a_entries = NULL;
entry_pointer a_other_entries = NULL;
! try
{
a_entries = s_entry_allocator.allocate(actual_size);
a_other_entries = s_entry_allocator.allocate(resize_policy::min_size);
}
! catch(...)
{
if (a_entries != NULL)
s_entry_allocator.deallocate(a_entries, actual_size);
--- 137,148 ----
entry_pointer a_entries = NULL;
entry_pointer a_other_entries = NULL;
! __try
{
a_entries = s_entry_allocator.allocate(actual_size);
a_other_entries = s_entry_allocator.allocate(resize_policy::min_size);
}
! __catch(...)
{
if (a_entries != NULL)
s_entry_allocator.deallocate(a_entries, actual_size);
Index: include/ext/pb_ds/detail/left_child_next_sibling_heap_/constructors_destructor_fn_imps.hpp
===================================================================
*** include/ext/pb_ds/detail/left_child_next_sibling_heap_/constructors_destructor_fn_imps.hpp (revision 143902)
--- include/ext/pb_ds/detail/left_child_next_sibling_heap_/constructors_destructor_fn_imps.hpp (working copy)
***************
*** 1,6 ****
// -*- C++ -*-
! // Copyright (C) 2005, 2006 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
--- 1,6 ----
// -*- C++ -*-
! // 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
*************** recursive_copy_node(const_node_pointer p
*** 122,132 ****
node_pointer p_ret = s_node_allocator.allocate(1);
! try
{
new (p_ret) node(*p_nd);
}
! catch(...)
{
s_node_allocator.deallocate(p_ret, 1);
__throw_exception_again;
--- 122,132 ----
node_pointer p_ret = s_node_allocator.allocate(1);
! __try
{
new (p_ret) node(*p_nd);
}
! __catch(...)
{
s_node_allocator.deallocate(p_ret, 1);
__throw_exception_again;
*************** recursive_copy_node(const_node_pointer p
*** 135,146 ****
p_ret->m_p_l_child = p_ret->m_p_next_sibling =
p_ret->m_p_prev_or_parent = NULL;
! 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(...)
{
clear_imp(p_ret);
__throw_exception_again;
--- 135,146 ----
p_ret->m_p_l_child = p_ret->m_p_next_sibling =
p_ret->m_p_prev_or_parent = NULL;
! __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(...)
{
clear_imp(p_ret);
__throw_exception_again;
Index: include/ext/pb_ds/detail/debug_map_base.hpp
===================================================================
*** include/ext/pb_ds/detail/debug_map_base.hpp (revision 143902)
--- include/ext/pb_ds/detail/debug_map_base.hpp (working copy)
***************
*** 1,6 ****
// -*- C++ -*-
! // Copyright (C) 2005, 2006, 2007, 2008 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
--- 1,6 ----
// -*- C++ -*-
! // 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
*************** namespace __gnu_pbds
*** 168,178 ****
std::abort();
}
! try
{
m_key_set.push_back(r_key);
}
! catch(...)
{
std::cerr << "insert_new" << r_key << std::endl;
std::abort();
--- 168,178 ----
std::abort();
}
! __try
{
m_key_set.push_back(r_key);
}
! __catch(...)
{
std::cerr << "insert_new" << r_key << std::endl;
std::abort();
Index: include/ext/pb_ds/detail/list_update_map_/constructor_destructor_fn_imps.hpp
===================================================================
*** include/ext/pb_ds/detail/list_update_map_/constructor_destructor_fn_imps.hpp (revision 143902)
--- include/ext/pb_ds/detail/list_update_map_/constructor_destructor_fn_imps.hpp (working copy)
***************
*** 1,6 ****
// -*- C++ -*-
! // Copyright (C) 2005, 2006 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
--- 1,6 ----
// -*- C++ -*-
! // 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
*************** PB_DS_CLASS_NAME(const PB_DS_CLASS_C_DEC
*** 93,99 ****
#endif
m_p_l(NULL)
{
! try
{
for (const_iterator it = other.begin(); it != other.end(); ++it)
{
--- 93,99 ----
#endif
m_p_l(NULL)
{
! __try
{
for (const_iterator it = other.begin(); it != other.end(); ++it)
{
*************** m_p_l(NULL)
*** 104,110 ****
m_p_l = p_l;
}
}
! catch(...)
{
deallocate_all();
__throw_exception_again;
--- 104,110 ----
m_p_l = p_l;
}
}
! __catch(...)
{
deallocate_all();
__throw_exception_again;
Index: include/ext/slist
===================================================================
*** include/ext/slist (revision 143902)
--- include/ext/slist (working copy)
***************
*** 1,6 ****
// Singly-linked list implementation -*- C++ -*-
! // Copyright (C) 2001, 2002, 2004, 2005, 2007 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
--- 1,7 ----
// Singly-linked list implementation -*- C++ -*-
! // 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
*************** _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
*** 327,338 ****
_M_create_node(const value_type& __x)
{
_Node* __node = this->_M_get_node();
! try
{
get_allocator().construct(&__node->_M_data, __x);
__node->_M_next = 0;
}
! catch(...)
{
this->_M_put_node(__node);
__throw_exception_again;
--- 328,339 ----
_M_create_node(const value_type& __x)
{
_Node* __node = this->_M_get_node();
! __try
{
get_allocator().construct(&__node->_M_data, __x);
__node->_M_next = 0;
}
! __catch(...)
{
this->_M_put_node(__node);
__throw_exception_again;
*************** _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
*** 344,355 ****
_M_create_node()
{
_Node* __node = this->_M_get_node();
! try
{
get_allocator().construct(&__node->_M_data, value_type());
__node->_M_next = 0;
}
! catch(...)
{
this->_M_put_node(__node);
__throw_exception_again;
--- 345,356 ----
_M_create_node()
{
_Node* __node = this->_M_get_node();
! __try
{
get_allocator().construct(&__node->_M_data, value_type());
__node->_M_next = 0;
}
! __catch(...)
{
this->_M_put_node(__node);
__throw_exception_again;
Index: include/ext/memory
===================================================================
*** include/ext/memory (revision 143902)
--- include/ext/memory (working copy)
***************
*** 1,6 ****
// Memory extensions -*- C++ -*-
! // Copyright (C) 2002, 2004, 2005 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
--- 1,7 ----
// Memory extensions -*- C++ -*-
! // 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
*************** _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
*** 79,91 ****
_ForwardIter __result, std::input_iterator_tag)
{
_ForwardIter __cur = __result;
! try
{
for (; __count > 0 ; --__count, ++__first, ++__cur)
std::_Construct(&*__cur, *__first);
return pair<_InputIter, _ForwardIter>(__first, __cur);
}
! catch(...)
{
std::_Destroy(__result, __cur);
__throw_exception_again;
--- 80,92 ----
_ForwardIter __result, std::input_iterator_tag)
{
_ForwardIter __cur = __result;
! __try
{
for (; __count > 0 ; --__count, ++__first, ++__cur)
std::_Construct(&*__cur, *__first);
return pair<_InputIter, _ForwardIter>(__first, __cur);
}
! __catch(...)
{
std::_Destroy(__result, __cur);
__throw_exception_again;
*************** _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
*** 138,150 ****
_Allocator __alloc)
{
_ForwardIter __cur = __result;
! try
{
for (; __count > 0 ; --__count, ++__first, ++__cur)
__alloc.construct(&*__cur, *__first);
return pair<_InputIter, _ForwardIter>(__first, __cur);
}
! catch(...)
{
std::_Destroy(__result, __cur, __alloc);
__throw_exception_again;
--- 139,151 ----
_Allocator __alloc)
{
_ForwardIter __cur = __result;
! __try
{
for (; __count > 0 ; --__count, ++__first, ++__cur)
__alloc.construct(&*__cur, *__first);
return pair<_InputIter, _ForwardIter>(__first, __cur);
}
! __catch(...)
{
std::_Destroy(__result, __cur, __alloc);
__throw_exception_again;
Index: include/ext/rc_string_base.h
===================================================================
*** include/ext/rc_string_base.h (revision 143902)
--- include/ext/rc_string_base.h (working copy)
***************
*** 1,6 ****
// Reference-counted versatile string base -*- C++ -*-
! // Copyright (C) 2005, 2006, 2007, 2008 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
--- 1,6 ----
// Reference-counted versatile string base -*- C++ -*-
! // 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
*************** _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
*** 515,521 ****
}
_Rep* __r = _Rep::_S_create(__len, size_type(0), __a);
_S_copy(__r->_M_refdata(), __buf, __len);
! try
{
while (__beg != __end)
{
--- 515,521 ----
}
_Rep* __r = _Rep::_S_create(__len, size_type(0), __a);
_S_copy(__r->_M_refdata(), __buf, __len);
! __try
{
while (__beg != __end)
{
*************** _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
*** 531,537 ****
++__beg;
}
}
! catch(...)
{
__r->_M_destroy(__a);
__throw_exception_again;
--- 531,537 ----
++__beg;
}
}
! __catch(...)
{
__r->_M_destroy(__a);
__throw_exception_again;
*************** _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
*** 559,567 ****
__end));
// Check for out_of_range and length_error exceptions.
_Rep* __r = _Rep::_S_create(__dnew, size_type(0), __a);
! try
{ _S_copy_chars(__r->_M_refdata(), __beg, __end); }
! catch(...)
{
__r->_M_destroy(__a);
__throw_exception_again;
--- 559,567 ----
__end));
// Check for out_of_range and length_error exceptions.
_Rep* __r = _Rep::_S_create(__dnew, size_type(0), __a);
! __try
{ _S_copy_chars(__r->_M_refdata(), __beg, __end); }
! __catch(...)
{
__r->_M_destroy(__a);
__throw_exception_again;
Index: include/ext/ropeimpl.h
===================================================================
*** include/ext/ropeimpl.h (revision 143902)
--- include/ext/ropeimpl.h (working copy)
***************
*** 1,6 ****
// SGI's rope class implementation -*- C++ -*-
! // Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007
// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
--- 1,6 ----
// SGI's rope class implementation -*- C++ -*-
! // 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
*************** _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
*** 439,450 ****
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
{
__result = _S_new_RopeLeaf(__new_data, __old_len + __len,
__r->_M_get_allocator());
}
! catch(...)
{
_RopeRep::__STL_FREE_STRING(__new_data, __old_len + __len,
__r->_M_get_allocator());
--- 439,450 ----
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
{
__result = _S_new_RopeLeaf(__new_data, __old_len + __len,
__r->_M_get_allocator());
}
! __catch(...)
{
_RopeRep::__STL_FREE_STRING(__new_data, __old_len + __len,
__r->_M_get_allocator());
*************** _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
*** 507,518 ****
{
_RopeRep* __balanced;
! try
{
__balanced = _S_balance(__result);
__result->_M_unref_nonnil();
}
! catch(...)
{
_C_deallocate(__result,1);
__throw_exception_again;
--- 507,518 ----
{
_RopeRep* __balanced;
! __try
{
__balanced = _S_balance(__result);
__result->_M_unref_nonnil();
}
! __catch(...)
{
_C_deallocate(__result,1);
__throw_exception_again;
*************** _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
*** 558,566 ****
_RopeRep* __nright =
_S_leaf_concat_char_iter((_RopeLeaf*)__right, __s, __slen);
__left->_M_ref_nonnil();
! try
{ __result = _S_tree_concat(__left, __nright); }
! catch(...)
{
_S_unref(__left);
_S_unref(__nright);
--- 558,566 ----
_RopeRep* __nright =
_S_leaf_concat_char_iter((_RopeLeaf*)__right, __s, __slen);
__left->_M_ref_nonnil();
! __try
{ __result = _S_tree_concat(__left, __nright); }
! __catch(...)
{
_S_unref(__left);
_S_unref(__nright);
*************** _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
*** 571,582 ****
}
_RopeRep* __nright =
__STL_ROPE_FROM_UNOWNED_CHAR_PTR(__s, __slen, __r->_M_get_allocator());
! try
{
__r->_M_ref_nonnil();
__result = _S_tree_concat(__r, __nright);
}
! catch(...)
{
_S_unref(__r);
_S_unref(__nright);
--- 571,582 ----
}
_RopeRep* __nright =
__STL_ROPE_FROM_UNOWNED_CHAR_PTR(__s, __slen, __r->_M_get_allocator());
! __try
{
__r->_M_ref_nonnil();
__result = _S_tree_concat(__r, __nright);
}
! __catch(...)
{
_S_unref(__r);
_S_unref(__nright);
*************** _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
*** 638,646 ****
_RopeRep* __right =
__STL_ROPE_FROM_UNOWNED_CHAR_PTR(__s, __slen, __r->_M_get_allocator());
__r->_M_ref_nonnil();
! try
{ __result = _S_tree_concat(__r, __right); }
! catch(...)
{
_S_unref(__r);
_S_unref(__right);
--- 638,646 ----
_RopeRep* __right =
__STL_ROPE_FROM_UNOWNED_CHAR_PTR(__s, __slen, __r->_M_get_allocator());
__r->_M_ref_nonnil();
! __try
{ __result = _S_tree_concat(__r, __right); }
! __catch(...)
{
_S_unref(__r);
_S_unref(__right);
*************** _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
*** 690,698 ****
_M_data,
__right->_M_size);
__leftleft->_M_ref_nonnil();
! try
{ return(_S_tree_concat(__leftleft, __rest)); }
! catch(...)
{
_S_unref(__leftleft);
_S_unref(__rest);
--- 690,698 ----
_M_data,
__right->_M_size);
__leftleft->_M_ref_nonnil();
! __try
{ return(_S_tree_concat(__leftleft, __rest)); }
! __catch(...)
{
_S_unref(__leftleft);
_S_unref(__rest);
*************** _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
*** 703,711 ****
}
__left->_M_ref_nonnil();
__right->_M_ref_nonnil();
! try
{ return(_S_tree_concat(__left, __right)); }
! catch(...)
{
_S_unref(__left);
_S_unref(__right);
--- 703,711 ----
}
__left->_M_ref_nonnil();
__right->_M_ref_nonnil();
! __try
{ return(_S_tree_concat(__left, __right)); }
! __catch(...)
{
_S_unref(__left);
_S_unref(__right);
*************** _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
*** 818,826 ****
goto lazy;
__section = (_CharT*)
_Data_allocate(_S_rounded_up_size(__result_len));
! try
{ (*(__f->_M_fn))(__start, __result_len, __section); }
! catch(...)
{
_RopeRep::__STL_FREE_STRING(__section, __result_len,
__base->_M_get_allocator());
--- 818,826 ----
goto lazy;
__section = (_CharT*)
_Data_allocate(_S_rounded_up_size(__result_len));
! __try
{ (*(__f->_M_fn))(__start, __result_len, __section); }
! __catch(...)
{
_RopeRep::__STL_FREE_STRING(__section, __result_len,
__base->_M_get_allocator());
*************** _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
*** 965,977 ****
bool __result;
_CharT* __buffer =
(_CharT*)_Alloc().allocate(__len * sizeof(_CharT));
! try
{
(*(__f->_M_fn))(__begin, __len, __buffer);
__result = __c(__buffer, __len);
_Alloc().deallocate(__buffer, __len * sizeof(_CharT));
}
! catch(...)
{
_Alloc().deallocate(__buffer, __len * sizeof(_CharT));
__throw_exception_again;
--- 965,977 ----
bool __result;
_CharT* __buffer =
(_CharT*)_Alloc().allocate(__len * sizeof(_CharT));
! __try
{
(*(__f->_M_fn))(__begin, __len, __buffer);
__result = __c(__buffer, __len);
_Alloc().deallocate(__buffer, __len * sizeof(_CharT));
}
! __catch(...)
{
_Alloc().deallocate(__buffer, __len * sizeof(_CharT));
__throw_exception_again;
*************** _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
*** 1027,1033 ****
if (!__is_simple)
__o.width(__w / __rope_len);
! try
{
if (__is_simple && !__left && __pad_len > 0)
_Rope_fill(__o, __pad_len);
--- 1027,1033 ----
if (!__is_simple)
__o.width(__w / __rope_len);
! __try
{
if (__is_simple && !__left && __pad_len > 0)
_Rope_fill(__o, __pad_len);
*************** _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
*** 1037,1043 ****
if (!__is_simple)
__o.width(__w);
}
! catch(...)
{
if (!__is_simple)
__o.width(__w);
--- 1037,1043 ----
if (!__is_simple)
__o.width(__w);
}
! __catch(...)
{
if (!__is_simple)
__o.width(__w);
*************** _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
*** 1216,1222 ****
for (__i = 0; __i <= int(__detail::_S_max_rope_depth); ++__i)
__forest[__i] = 0;
! try
{
_S_add_to_forest(__r, __forest);
for (__i = 0; __i <= int(__detail::_S_max_rope_depth); ++__i)
--- 1216,1222 ----
for (__i = 0; __i <= int(__detail::_S_max_rope_depth); ++__i)
__forest[__i] = 0;
! __try
{
_S_add_to_forest(__r, __forest);
for (__i = 0; __i <= int(__detail::_S_max_rope_depth); ++__i)
*************** _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
*** 1232,1238 ****
#endif
}
}
! catch(...)
{
for(__i = 0; __i <= int(__detail::_S_max_rope_depth); __i++)
_S_unref(__forest[__i]);
--- 1232,1238 ----
#endif
}
}
! __catch(...)
{
for(__i = 0; __i <= int(__detail::_S_max_rope_depth); __i++)
_S_unref(__forest[__i]);
*************** _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
*** 1552,1561 ****
__uninitialized_fill_n_a(__rest_buffer, __rest, __c,
_M_get_allocator());
_S_cond_store_eos(__rest_buffer[__rest]);
! try
{ __remainder = _S_new_RopeLeaf(__rest_buffer, __rest,
_M_get_allocator()); }
! catch(...)
{
_RopeRep::__STL_FREE_STRING(__rest_buffer, __rest,
_M_get_allocator());
--- 1552,1561 ----
__uninitialized_fill_n_a(__rest_buffer, __rest, __c,
_M_get_allocator());
_S_cond_store_eos(__rest_buffer[__rest]);
! __try
{ __remainder = _S_new_RopeLeaf(__rest_buffer, __rest,
_M_get_allocator()); }
! __catch(...)
{
_RopeRep::__STL_FREE_STRING(__rest_buffer, __rest,
_M_get_allocator());
*************** _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
*** 1572,1584 ****
__uninitialized_fill_n_a(__base_buffer, __exponentiate_threshold, __c,
_M_get_allocator());
_S_cond_store_eos(__base_buffer[__exponentiate_threshold]);
! try
{
__base_leaf = _S_new_RopeLeaf(__base_buffer,
__exponentiate_threshold,
_M_get_allocator());
}
! catch(...)
{
_RopeRep::__STL_FREE_STRING(__base_buffer,
__exponentiate_threshold,
--- 1572,1584 ----
__uninitialized_fill_n_a(__base_buffer, __exponentiate_threshold, __c,
_M_get_allocator());
_S_cond_store_eos(__base_buffer[__exponentiate_threshold]);
! __try
{
__base_leaf = _S_new_RopeLeaf(__base_buffer,
__exponentiate_threshold,
_M_get_allocator());
}
! __catch(...)
{
_RopeRep::__STL_FREE_STRING(__base_buffer,
__exponentiate_threshold,
Index: include/ext/vstring.tcc
===================================================================
*** include/ext/vstring.tcc (revision 143902)
--- include/ext/vstring.tcc (working copy)
***************
*** 1,6 ****
// Versatile string -*- C++ -*-
! // Copyright (C) 2005, 2006, 2007 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
--- 1,6 ----
// Versatile string -*- C++ -*-
! // 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
*************** _GLIBCXX_BEGIN_NAMESPACE(std)
*** 567,573 ****
typename __istream_type::sentry __cerb(__in, false);
if (__cerb)
{
! try
{
// Avoid reallocation for common case.
__str.erase();
--- 567,573 ----
typename __istream_type::sentry __cerb(__in, false);
if (__cerb)
{
! __try
{
// Avoid reallocation for common case.
__str.erase();
*************** _GLIBCXX_BEGIN_NAMESPACE(std)
*** 600,611 ****
__err |= __ios_base::eofbit;
__in.width(0);
}
! catch(__cxxabiv1::__forced_unwind&)
{
__in._M_setstate(__ios_base::badbit);
__throw_exception_again;
}
! catch(...)
{
// _GLIBCXX_RESOLVE_LIB_DEFECTS
// 91. Description of operator>> and getline() for string<>
--- 600,611 ----
__err |= __ios_base::eofbit;
__in.width(0);
}
! __catch(__cxxabiv1::__forced_unwind&)
{
__in._M_setstate(__ios_base::badbit);
__throw_exception_again;
}
! __catch(...)
{
// _GLIBCXX_RESOLVE_LIB_DEFECTS
// 91. Description of operator>> and getline() for string<>
*************** _GLIBCXX_BEGIN_NAMESPACE(std)
*** 641,647 ****
typename __istream_type::sentry __cerb(__in, true);
if (__cerb)
{
! try
{
// Avoid reallocation for common case.
__str.erase();
--- 641,647 ----
typename __istream_type::sentry __cerb(__in, true);
if (__cerb)
{
! __try
{
// Avoid reallocation for common case.
__str.erase();
*************** _GLIBCXX_BEGIN_NAMESPACE(std)
*** 676,687 ****
else
__err |= __ios_base::failbit;
}
! catch(__cxxabiv1::__forced_unwind&)
{
__in._M_setstate(__ios_base::badbit);
__throw_exception_again;
}
! catch(...)
{
// _GLIBCXX_RESOLVE_LIB_DEFECTS
// 91. Description of operator>> and getline() for string<>
--- 676,687 ----
else
__err |= __ios_base::failbit;
}
! __catch(__cxxabiv1::__forced_unwind&)
{
__in._M_setstate(__ios_base::badbit);
__throw_exception_again;
}
! __catch(...)
{
// _GLIBCXX_RESOLVE_LIB_DEFECTS
// 91. Description of operator>> and getline() for string<>
Index: include/ext/rope
===================================================================
*** include/ext/rope (revision 143902)
--- include/ext/rope (working copy)
***************
*** 1,6 ****
// SGI's rope class -*- C++ -*-
! // Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
--- 1,6 ----
// SGI's rope class -*- C++ -*-
! // 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
*************** protected:
*** 1689,1697 ****
__uninitialized_copy_n_a(__s, __size, __buf, __a);
_S_cond_store_eos(__buf[__size]);
! try
{ return _S_new_RopeLeaf(__buf, __size, __a); }
! catch(...)
{
_RopeRep::__STL_FREE_STRING(__buf, __size, __a);
__throw_exception_again;
--- 1689,1697 ----
__uninitialized_copy_n_a(__s, __size, __buf, __a);
_S_cond_store_eos(__buf[__size]);
! __try
{ return _S_new_RopeLeaf(__buf, __size, __a); }
! __catch(...)
{
_RopeRep::__STL_FREE_STRING(__buf, __size, __a);
__throw_exception_again;
*************** protected:
*** 1845,1856 ****
_CharT* __buf = this->_Data_allocate(_S_rounded_up_size(1));
_M_get_allocator().construct(__buf, __c);
! try
{
this->_M_tree_ptr = _S_new_RopeLeaf(__buf, 1,
_M_get_allocator());
}
! catch(...)
{
_RopeRep::__STL_FREE_STRING(__buf, 1, _M_get_allocator());
__throw_exception_again;
--- 1845,1856 ----
_CharT* __buf = this->_Data_allocate(_S_rounded_up_size(1));
_M_get_allocator().construct(__buf, __c);
! __try
{
this->_M_tree_ptr = _S_new_RopeLeaf(__buf, 1,
_M_get_allocator());
}
! __catch(...)
{
_RopeRep::__STL_FREE_STRING(__buf, 1, _M_get_allocator());
__throw_exception_again;
*************** protected:
*** 1924,1936 ****
_RopeRep* __old = this->_M_tree_ptr;
_RopeRep* __left =
__STL_ROPE_FROM_UNOWNED_CHAR_PTR(&__x, 1, _M_get_allocator());
! try
{
this->_M_tree_ptr = _S_concat(__left, this->_M_tree_ptr);
_S_unref(__old);
_S_unref(__left);
}
! catch(...)
{
_S_unref(__left);
__throw_exception_again;
--- 1924,1936 ----
_RopeRep* __old = this->_M_tree_ptr;
_RopeRep* __left =
__STL_ROPE_FROM_UNOWNED_CHAR_PTR(&__x, 1, _M_get_allocator());
! __try
{
this->_M_tree_ptr = _S_concat(__left, this->_M_tree_ptr);
_S_unref(__old);
_S_unref(__left);
}
! __catch(...)
{
_S_unref(__left);
__throw_exception_again;
Index: include/ext/sso_string_base.h
===================================================================
*** include/ext/sso_string_base.h (revision 143902)
--- include/ext/sso_string_base.h (working copy)
***************
*** 1,6 ****
// Short-string-optimized versatile string base -*- C++ -*-
! // Copyright (C) 2005, 2006, 2007, 2008 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
--- 1,6 ----
// Short-string-optimized versatile string base -*- C++ -*-
! // 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
*************** _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
*** 398,404 ****
++__beg;
}
! try
{
while (__beg != __end)
{
--- 398,404 ----
++__beg;
}
! __try
{
while (__beg != __end)
{
*************** _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
*** 416,422 ****
++__beg;
}
}
! catch(...)
{
_M_dispose();
__throw_exception_again;
--- 416,422 ----
++__beg;
}
}
! __catch(...)
{
_M_dispose();
__throw_exception_again;
*************** _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
*** 446,454 ****
}
// Check for out_of_range and length_error exceptions.
! try
{ _S_copy_chars(_M_data(), __beg, __end); }
! catch(...)
{
_M_dispose();
__throw_exception_again;
--- 446,454 ----
}
// Check for out_of_range and length_error exceptions.
! __try
{ _S_copy_chars(_M_data(), __beg, __end); }
! __catch(...)
{
_M_dispose();
__throw_exception_again;
Index: include/bits/shared_ptr.h
===================================================================
*** include/bits/shared_ptr.h (revision 143902)
--- include/bits/shared_ptr.h (working copy)
***************
*** 1,6 ****
// <bits/shared_ptr.h> -*- C++ -*-
! // Copyright (C) 2007, 2008 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
--- 1,6 ----
// <bits/shared_ptr.h> -*- C++ -*-
! // 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
*************** namespace std
*** 222,232 ****
template<typename _Ptr>
__shared_count(_Ptr __p) : _M_pi(0)
{
! try
{
_M_pi = new _Sp_counted_ptr<_Ptr, _Lp>(__p);
}
! catch(...)
{
delete __p;
__throw_exception_again;
--- 222,232 ----
template<typename _Ptr>
__shared_count(_Ptr __p) : _M_pi(0)
{
! __try
{
_M_pi = new _Sp_counted_ptr<_Ptr, _Lp>(__p);
}
! __catch(...)
{
delete __p;
__throw_exception_again;
*************** namespace std
*** 241,252 ****
typedef _Sp_counted_deleter<_Ptr, _Deleter, _Alloc, _Lp> _Sp_cd_type;
typedef std::allocator<_Sp_cd_type> _Alloc2;
_Alloc2 __a2;
! try
{
_M_pi = __a2.allocate(1);
::new(static_cast<void*>(_M_pi)) _Sp_cd_type(__p, __d);
}
! catch(...)
{
__d(__p); // Call _Deleter on __p.
if (_M_pi)
--- 241,252 ----
typedef _Sp_counted_deleter<_Ptr, _Deleter, _Alloc, _Lp> _Sp_cd_type;
typedef std::allocator<_Sp_cd_type> _Alloc2;
_Alloc2 __a2;
! __try
{
_M_pi = __a2.allocate(1);
::new(static_cast<void*>(_M_pi)) _Sp_cd_type(__p, __d);
}
! __catch(...)
{
__d(__p); // Call _Deleter on __p.
if (_M_pi)
*************** namespace std
*** 261,272 ****
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
{
_M_pi = __a2.allocate(1);
::new(static_cast<void*>(_M_pi)) _Sp_cd_type(__p, __d, __a);
}
! catch(...)
{
__d(__p); // Call _Deleter on __p.
if (_M_pi)
--- 261,272 ----
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
{
_M_pi = __a2.allocate(1);
::new(static_cast<void*>(_M_pi)) _Sp_cd_type(__p, __d, __a);
}
! __catch(...)
{
__d(__p); // Call _Deleter on __p.
if (_M_pi)
*************** namespace std
*** 282,294 ****
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
{
_M_pi = __a2.allocate(1);
::new(static_cast<void*>(_M_pi)) _Sp_cp_type(__a,
std::forward<_Args>(__args)...);
}
! catch(...)
{
if (_M_pi)
__a2.deallocate(static_cast<_Sp_cp_type*>(_M_pi), 1);
--- 282,294 ----
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
{
_M_pi = __a2.allocate(1);
::new(static_cast<void*>(_M_pi)) _Sp_cp_type(__a,
std::forward<_Args>(__args)...);
}
! __catch(...)
{
if (_M_pi)
__a2.deallocate(static_cast<_Sp_cp_type*>(_M_pi), 1);
*************** namespace std
*** 1074,1084 ****
if (expired())
return __shared_ptr<element_type, _Lp>();
! try
{
return __shared_ptr<element_type, _Lp>(*this);
}
! catch(const bad_weak_ptr&)
{
// Q: How can we get here?
// A: Another thread may have invalidated r after the
--- 1074,1084 ----
if (expired())
return __shared_ptr<element_type, _Lp>();
! __try
{
return __shared_ptr<element_type, _Lp>(*this);
}
! __catch(const bad_weak_ptr&)
{
// Q: How can we get here?
// A: Another thread may have invalidated r after the
*************** namespace std
*** 1447,1457 ****
if (this->expired())
return shared_ptr<_Tp>();
! try
{
return shared_ptr<_Tp>(*this);
}
! catch(const bad_weak_ptr&)
{
return shared_ptr<_Tp>();
}
--- 1447,1457 ----
if (this->expired())
return shared_ptr<_Tp>();
! __try
{
return shared_ptr<_Tp>(*this);
}
! __catch(const bad_weak_ptr&)
{
return shared_ptr<_Tp>();
}
Index: include/bits/stl_list.h
===================================================================
*** include/bits/stl_list.h (revision 143902)
--- include/bits/stl_list.h (working copy)
***************
*** 1,6 ****
// List implementation -*- C++ -*-
! // Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
--- 1,6 ----
// List implementation -*- C++ -*-
! // 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
*************** _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GL
*** 465,475 ****
_M_create_node(const value_type& __x)
{
_Node* __p = this->_M_get_node();
! try
{
_M_get_Tp_allocator().construct(&__p->_M_data, __x);
}
! catch(...)
{
_M_put_node(__p);
__throw_exception_again;
--- 465,475 ----
_M_create_node(const value_type& __x)
{
_Node* __p = this->_M_get_node();
! __try
{
_M_get_Tp_allocator().construct(&__p->_M_data, __x);
}
! __catch(...)
{
_M_put_node(__p);
__throw_exception_again;
*************** _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GL
*** 482,493 ****
_M_create_node(_Args&&... __args)
{
_Node* __p = this->_M_get_node();
! try
{
_M_get_Node_allocator().construct(__p,
std::forward<_Args>(__args)...);
}
! catch(...)
{
_M_put_node(__p);
__throw_exception_again;
--- 482,493 ----
_M_create_node(_Args&&... __args)
{
_Node* __p = this->_M_get_node();
! __try
{
_M_get_Node_allocator().construct(__p,
std::forward<_Args>(__args)...);
}
! __catch(...)
{
_M_put_node(__p);
__throw_exception_again;
Index: include/bits/locale_classes.tcc
===================================================================
*** include/bits/locale_classes.tcc (revision 143902)
--- include/bits/locale_classes.tcc (working copy)
***************
*** 1,6 ****
// Locale support -*- C++ -*-
! // Copyright (C) 2007, 2008 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
--- 1,6 ----
// Locale support -*- C++ -*-
! // 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
*************** _GLIBCXX_BEGIN_NAMESPACE(std)
*** 49,57 ****
{
_M_impl = new _Impl(*__other._M_impl, 1);
! try
{ _M_impl->_M_install_facet(&_Facet::id, __f); }
! catch(...)
{
_M_impl->_M_remove_reference();
__throw_exception_again;
--- 49,57 ----
{
_M_impl = new _Impl(*__other._M_impl, 1);
! __try
{ _M_impl->_M_install_facet(&_Facet::id, __f); }
! __catch(...)
{
_M_impl->_M_remove_reference();
__throw_exception_again;
*************** _GLIBCXX_BEGIN_NAMESPACE(std)
*** 66,76 ****
combine(const locale& __other) const
{
_Impl* __tmp = new _Impl(*_M_impl, 1);
! try
{
__tmp->_M_replace_facet(__other._M_impl, &_Facet::id);
}
! catch(...)
{
__tmp->_M_remove_reference();
__throw_exception_again;
--- 66,76 ----
combine(const locale& __other) const
{
_Impl* __tmp = new _Impl(*_M_impl, 1);
! __try
{
__tmp->_M_replace_facet(__other._M_impl, &_Facet::id);
}
! __catch(...)
{
__tmp->_M_remove_reference();
__throw_exception_again;
*************** _GLIBCXX_BEGIN_NAMESPACE(std)
*** 189,195 ****
_CharT* __c = new _CharT[__len];
! try
{
// strxfrm stops when it sees a nul character so we break
// the string into zero-terminated substrings and pass those
--- 189,195 ----
_CharT* __c = new _CharT[__len];
! __try
{
// strxfrm stops when it sees a nul character so we break
// the string into zero-terminated substrings and pass those
*************** _GLIBCXX_BEGIN_NAMESPACE(std)
*** 217,223 ****
__ret.push_back(_CharT());
}
}
! catch(...)
{
delete [] __c;
__throw_exception_again;
--- 217,223 ----
__ret.push_back(_CharT());
}
}
! __catch(...)
{
delete [] __c;
__throw_exception_again;
Index: include/bits/locale_facets.tcc
===================================================================
*** include/bits/locale_facets.tcc (revision 143902)
--- include/bits/locale_facets.tcc (working copy)
***************
*** 1,7 ****
// Locale support -*- C++ -*-
// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
! // 2006, 2007, 2008
// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
--- 1,7 ----
// Locale support -*- C++ -*-
// 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
*************** _GLIBCXX_BEGIN_NAMESPACE(std)
*** 62,73 ****
if (!__caches[__i])
{
__numpunct_cache<_CharT>* __tmp = NULL;
! try
{
__tmp = new __numpunct_cache<_CharT>;
__tmp->_M_cache(__loc);
}
! catch(...)
{
delete __tmp;
__throw_exception_again;
--- 62,73 ----
if (!__caches[__i])
{
__numpunct_cache<_CharT>* __tmp = NULL;
! __try
{
__tmp = new __numpunct_cache<_CharT>;
__tmp->_M_cache(__loc);
}
! __catch(...)
{
delete __tmp;
__throw_exception_again;
Index: include/bits/locale_classes.h
===================================================================
*** include/bits/locale_classes.h (revision 143902)
--- include/bits/locale_classes.h (working copy)
***************
*** 1,7 ****
// Locale support -*- C++ -*-
// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
! // 2006, 2007, 2008
// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
--- 1,7 ----
// Locale support -*- C++ -*-
// 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
*************** _GLIBCXX_BEGIN_NAMESPACE(std)
*** 404,412 ****
{
if (__gnu_cxx::__exchange_and_add_dispatch(&_M_refcount, -1) == 1)
{
! try
{ delete this; }
! catch(...)
{ }
}
}
--- 404,412 ----
{
if (__gnu_cxx::__exchange_and_add_dispatch(&_M_refcount, -1) == 1)
{
! __try
{ delete this; }
! __catch(...)
{ }
}
}
*************** _GLIBCXX_BEGIN_NAMESPACE(std)
*** 509,517 ****
{
if (__gnu_cxx::__exchange_and_add_dispatch(&_M_refcount, -1) == 1)
{
! try
{ delete this; }
! catch(...)
{ }
}
}
--- 509,517 ----
{
if (__gnu_cxx::__exchange_and_add_dispatch(&_M_refcount, -1) == 1)
{
! __try
{ delete this; }
! __catch(...)
{ }
}
}
Index: include/bits/forward_list.h
===================================================================
*** include/bits/forward_list.h (revision 143902)
--- include/bits/forward_list.h (working copy)
*************** _GLIBCXX_BEGIN_NAMESPACE(std)
*** 366,378 ****
_M_create_node(_Args&&... __args)
{
typename _Node::_Pointer __node = this->_M_get_node();
! try
{
_M_get_Node_allocator().construct(__node,
std::forward<_Args>(__args)...);
__node->_M_next = 0;
}
! catch(...)
{
this->_M_put_node(__node);
__throw_exception_again;
--- 366,378 ----
_M_create_node(_Args&&... __args)
{
typename _Node::_Pointer __node = this->_M_get_node();
! __try
{
_M_get_Node_allocator().construct(__node,
std::forward<_Args>(__args)...);
__node->_M_next = 0;
}
! __catch(...)
{
this->_M_put_node(__node);
__throw_exception_again;
Index: include/bits/stl_vector.h
===================================================================
*** include/bits/stl_vector.h (revision 143902)
--- include/bits/stl_vector.h (working copy)
***************
*** 1,6 ****
// Vector implementation -*- C++ -*-
! // Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
--- 1,6 ----
// Vector implementation -*- C++ -*-
! // 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
*************** _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GL
*** 968,980 ****
_ForwardIterator __first, _ForwardIterator __last)
{
pointer __result = this->_M_allocate(__n);
! try
{
std::__uninitialized_copy_a(__first, __last, __result,
_M_get_Tp_allocator());
return __result;
}
! catch(...)
{
_M_deallocate(__result, __n);
__throw_exception_again;
--- 968,980 ----
_ForwardIterator __first, _ForwardIterator __last)
{
pointer __result = this->_M_allocate(__n);
! __try
{
std::__uninitialized_copy_a(__first, __last, __result,
_M_get_Tp_allocator());
return __result;
}
! __catch(...)
{
_M_deallocate(__result, __n);
__throw_exception_again;
Index: include/bits/stl_deque.h
===================================================================
*** include/bits/stl_deque.h (revision 143902)
--- include/bits/stl_deque.h (working copy)
***************
*** 1,6 ****
// Deque implementation -*- C++ -*-
! // Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
--- 1,6 ----
// Deque implementation -*- C++ -*-
! // 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
*************** _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GL
*** 513,521 ****
+ (this->_M_impl._M_map_size - __num_nodes) / 2);
_Tp** __nfinish = __nstart + __num_nodes;
! try
{ _M_create_nodes(__nstart, __nfinish); }
! catch(...)
{
_M_deallocate_map(this->_M_impl._M_map, this->_M_impl._M_map_size);
this->_M_impl._M_map = 0;
--- 513,521 ----
+ (this->_M_impl._M_map_size - __num_nodes) / 2);
_Tp** __nfinish = __nstart + __num_nodes;
! __try
{ _M_create_nodes(__nstart, __nfinish); }
! __catch(...)
{
_M_deallocate_map(this->_M_impl._M_map, this->_M_impl._M_map_size);
this->_M_impl._M_map = 0;
*************** _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GL
*** 537,548 ****
_M_create_nodes(_Tp** __nstart, _Tp** __nfinish)
{
_Tp** __cur;
! try
{
for (__cur = __nstart; __cur < __nfinish; ++__cur)
*__cur = this->_M_allocate_node();
}
! catch(...)
{
_M_destroy_nodes(__nstart, __cur);
__throw_exception_again;
--- 537,548 ----
_M_create_nodes(_Tp** __nstart, _Tp** __nfinish)
{
_Tp** __cur;
! __try
{
for (__cur = __nstart; __cur < __nfinish; ++__cur)
*__cur = this->_M_allocate_node();
}
! __catch(...)
{
_M_destroy_nodes(__nstart, __cur);
__throw_exception_again;
Index: include/bits/istream.tcc
===================================================================
*** include/bits/istream.tcc (revision 143902)
--- include/bits/istream.tcc (working copy)
***************
*** 1,7 ****
// istream classes -*- C++ -*-
// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
! // 2006, 2007
// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
--- 1,7 ----
// istream classes -*- C++ -*-
// 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
*************** _GLIBCXX_BEGIN_NAMESPACE(std)
*** 95,111 ****
if (__cerb)
{
ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
! try
{
const __num_get_type& __ng = __check_facet(this->_M_num_get);
__ng.get(*this, 0, *this, __err, __v);
}
! catch(__cxxabiv1::__forced_unwind&)
{
this->_M_setstate(ios_base::badbit);
__throw_exception_again;
}
! catch(...)
{ this->_M_setstate(ios_base::badbit); }
if (__err)
this->setstate(__err);
--- 95,111 ----
if (__cerb)
{
ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
! __try
{
const __num_get_type& __ng = __check_facet(this->_M_num_get);
__ng.get(*this, 0, *this, __err, __v);
}
! __catch(__cxxabiv1::__forced_unwind&)
{
this->_M_setstate(ios_base::badbit);
__throw_exception_again;
}
! __catch(...)
{ this->_M_setstate(ios_base::badbit); }
if (__err)
this->setstate(__err);
*************** _GLIBCXX_BEGIN_NAMESPACE(std)
*** 162,168 ****
sentry __cerb(*this, false);
if (__cerb && __sbout)
{
! try
{
bool __ineof;
if (!__copy_streambufs_eof(this->rdbuf(), __sbout, __ineof))
--- 162,168 ----
sentry __cerb(*this, false);
if (__cerb && __sbout)
{
! __try
{
bool __ineof;
if (!__copy_streambufs_eof(this->rdbuf(), __sbout, __ineof))
*************** _GLIBCXX_BEGIN_NAMESPACE(std)
*** 170,181 ****
if (__ineof)
__err |= ios_base::eofbit;
}
! catch(__cxxabiv1::__forced_unwind&)
{
this->_M_setstate(ios_base::failbit);
__throw_exception_again;
}
! catch(...)
{ this->_M_setstate(ios_base::failbit); }
}
else if (!__sbout)
--- 170,181 ----
if (__ineof)
__err |= ios_base::eofbit;
}
! __catch(__cxxabiv1::__forced_unwind&)
{
this->_M_setstate(ios_base::failbit);
__throw_exception_again;
}
! __catch(...)
{ this->_M_setstate(ios_base::failbit); }
}
else if (!__sbout)
*************** _GLIBCXX_BEGIN_NAMESPACE(std)
*** 197,203 ****
sentry __cerb(*this, true);
if (__cerb)
{
! try
{
__c = this->rdbuf()->sbumpc();
// 27.6.1.1 paragraph 3
--- 197,203 ----
sentry __cerb(*this, true);
if (__cerb)
{
! __try
{
__c = this->rdbuf()->sbumpc();
// 27.6.1.1 paragraph 3
*************** _GLIBCXX_BEGIN_NAMESPACE(std)
*** 206,217 ****
else
__err |= ios_base::eofbit;
}
! catch(__cxxabiv1::__forced_unwind&)
{
this->_M_setstate(ios_base::badbit);
__throw_exception_again;
}
! catch(...)
{ this->_M_setstate(ios_base::badbit); }
}
if (!_M_gcount)
--- 206,217 ----
else
__err |= ios_base::eofbit;
}
! __catch(__cxxabiv1::__forced_unwind&)
{
this->_M_setstate(ios_base::badbit);
__throw_exception_again;
}
! __catch(...)
{ this->_M_setstate(ios_base::badbit); }
}
if (!_M_gcount)
*************** _GLIBCXX_BEGIN_NAMESPACE(std)
*** 231,237 ****
sentry __cerb(*this, true);
if (__cerb)
{
! try
{
const int_type __cb = this->rdbuf()->sbumpc();
// 27.6.1.1 paragraph 3
--- 231,237 ----
sentry __cerb(*this, true);
if (__cerb)
{
! __try
{
const int_type __cb = this->rdbuf()->sbumpc();
// 27.6.1.1 paragraph 3
*************** _GLIBCXX_BEGIN_NAMESPACE(std)
*** 243,254 ****
else
__err |= ios_base::eofbit;
}
! catch(__cxxabiv1::__forced_unwind&)
{
this->_M_setstate(ios_base::badbit);
__throw_exception_again;
}
! catch(...)
{ this->_M_setstate(ios_base::badbit); }
}
if (!_M_gcount)
--- 243,254 ----
else
__err |= ios_base::eofbit;
}
! __catch(__cxxabiv1::__forced_unwind&)
{
this->_M_setstate(ios_base::badbit);
__throw_exception_again;
}
! __catch(...)
{ this->_M_setstate(ios_base::badbit); }
}
if (!_M_gcount)
*************** _GLIBCXX_BEGIN_NAMESPACE(std)
*** 268,274 ****
sentry __cerb(*this, true);
if (__cerb)
{
! try
{
const int_type __idelim = traits_type::to_int_type(__delim);
const int_type __eof = traits_type::eof();
--- 268,274 ----
sentry __cerb(*this, true);
if (__cerb)
{
! __try
{
const int_type __idelim = traits_type::to_int_type(__delim);
const int_type __eof = traits_type::eof();
*************** _GLIBCXX_BEGIN_NAMESPACE(std)
*** 286,297 ****
if (traits_type::eq_int_type(__c, __eof))
__err |= ios_base::eofbit;
}
! catch(__cxxabiv1::__forced_unwind&)
{
this->_M_setstate(ios_base::badbit);
__throw_exception_again;
}
! catch(...)
{ this->_M_setstate(ios_base::badbit); }
}
// _GLIBCXX_RESOLVE_LIB_DEFECTS
--- 286,297 ----
if (traits_type::eq_int_type(__c, __eof))
__err |= ios_base::eofbit;
}
! __catch(__cxxabiv1::__forced_unwind&)
{
this->_M_setstate(ios_base::badbit);
__throw_exception_again;
}
! __catch(...)
{ this->_M_setstate(ios_base::badbit); }
}
// _GLIBCXX_RESOLVE_LIB_DEFECTS
*************** _GLIBCXX_BEGIN_NAMESPACE(std)
*** 315,321 ****
sentry __cerb(*this, true);
if (__cerb)
{
! try
{
const int_type __idelim = traits_type::to_int_type(__delim);
const int_type __eof = traits_type::eof();
--- 315,321 ----
sentry __cerb(*this, true);
if (__cerb)
{
! __try
{
const int_type __idelim = traits_type::to_int_type(__delim);
const int_type __eof = traits_type::eof();
*************** _GLIBCXX_BEGIN_NAMESPACE(std)
*** 334,345 ****
if (traits_type::eq_int_type(__c, __eof))
__err |= ios_base::eofbit;
}
! catch(__cxxabiv1::__forced_unwind&)
{
this->_M_setstate(ios_base::badbit);
__throw_exception_again;
}
! catch(...)
{ this->_M_setstate(ios_base::badbit); }
}
if (!_M_gcount)
--- 334,345 ----
if (traits_type::eq_int_type(__c, __eof))
__err |= ios_base::eofbit;
}
! __catch(__cxxabiv1::__forced_unwind&)
{
this->_M_setstate(ios_base::badbit);
__throw_exception_again;
}
! __catch(...)
{ this->_M_setstate(ios_base::badbit); }
}
if (!_M_gcount)
*************** _GLIBCXX_BEGIN_NAMESPACE(std)
*** 359,365 ****
sentry __cerb(*this, true);
if (__cerb)
{
! try
{
const int_type __idelim = traits_type::to_int_type(__delim);
const int_type __eof = traits_type::eof();
--- 359,365 ----
sentry __cerb(*this, true);
if (__cerb)
{
! __try
{
const int_type __idelim = traits_type::to_int_type(__delim);
const int_type __eof = traits_type::eof();
*************** _GLIBCXX_BEGIN_NAMESPACE(std)
*** 387,398 ****
__err |= ios_base::failbit;
}
}
! catch(__cxxabiv1::__forced_unwind&)
{
this->_M_setstate(ios_base::badbit);
__throw_exception_again;
}
! catch(...)
{ this->_M_setstate(ios_base::badbit); }
}
// _GLIBCXX_RESOLVE_LIB_DEFECTS
--- 387,398 ----
__err |= ios_base::failbit;
}
}
! __catch(__cxxabiv1::__forced_unwind&)
{
this->_M_setstate(ios_base::badbit);
__throw_exception_again;
}
! __catch(...)
{ this->_M_setstate(ios_base::badbit); }
}
// _GLIBCXX_RESOLVE_LIB_DEFECTS
*************** _GLIBCXX_BEGIN_NAMESPACE(std)
*** 419,425 ****
if (__cerb)
{
ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
! try
{
const int_type __eof = traits_type::eof();
__streambuf_type* __sb = this->rdbuf();
--- 419,425 ----
if (__cerb)
{
ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
! __try
{
const int_type __eof = traits_type::eof();
__streambuf_type* __sb = this->rdbuf();
*************** _GLIBCXX_BEGIN_NAMESPACE(std)
*** 429,440 ****
else
_M_gcount = 1;
}
! catch(__cxxabiv1::__forced_unwind&)
{
this->_M_setstate(ios_base::badbit);
__throw_exception_again;
}
! catch(...)
{ this->_M_setstate(ios_base::badbit); }
if (__err)
this->setstate(__err);
--- 429,440 ----
else
_M_gcount = 1;
}
! __catch(__cxxabiv1::__forced_unwind&)
{
this->_M_setstate(ios_base::badbit);
__throw_exception_again;
}
! __catch(...)
{ this->_M_setstate(ios_base::badbit); }
if (__err)
this->setstate(__err);
*************** _GLIBCXX_BEGIN_NAMESPACE(std)
*** 452,458 ****
if (__cerb && __n > 0)
{
ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
! try
{
const int_type __eof = traits_type::eof();
__streambuf_type* __sb = this->rdbuf();
--- 452,458 ----
if (__cerb && __n > 0)
{
ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
! __try
{
const int_type __eof = traits_type::eof();
__streambuf_type* __sb = this->rdbuf();
*************** _GLIBCXX_BEGIN_NAMESPACE(std)
*** 491,502 ****
if (traits_type::eq_int_type(__c, __eof))
__err |= ios_base::eofbit;
}
! catch(__cxxabiv1::__forced_unwind&)
{
this->_M_setstate(ios_base::badbit);
__throw_exception_again;
}
! catch(...)
{ this->_M_setstate(ios_base::badbit); }
if (__err)
this->setstate(__err);
--- 491,502 ----
if (traits_type::eq_int_type(__c, __eof))
__err |= ios_base::eofbit;
}
! __catch(__cxxabiv1::__forced_unwind&)
{
this->_M_setstate(ios_base::badbit);
__throw_exception_again;
}
! __catch(...)
{ this->_M_setstate(ios_base::badbit); }
if (__err)
this->setstate(__err);
*************** _GLIBCXX_BEGIN_NAMESPACE(std)
*** 514,520 ****
if (__cerb && __n > 0)
{
ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
! try
{
const int_type __eof = traits_type::eof();
__streambuf_type* __sb = this->rdbuf();
--- 514,520 ----
if (__cerb && __n > 0)
{
ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
! __try
{
const int_type __eof = traits_type::eof();
__streambuf_type* __sb = this->rdbuf();
*************** _GLIBCXX_BEGIN_NAMESPACE(std)
*** 556,567 ****
__sb->sbumpc();
}
}
! catch(__cxxabiv1::__forced_unwind&)
{
this->_M_setstate(ios_base::badbit);
__throw_exception_again;
}
! catch(...)
{ this->_M_setstate(ios_base::badbit); }
if (__err)
this->setstate(__err);
--- 556,567 ----
__sb->sbumpc();
}
}
! __catch(__cxxabiv1::__forced_unwind&)
{
this->_M_setstate(ios_base::badbit);
__throw_exception_again;
}
! __catch(...)
{ this->_M_setstate(ios_base::badbit); }
if (__err)
this->setstate(__err);
*************** _GLIBCXX_BEGIN_NAMESPACE(std)
*** 580,597 ****
if (__cerb)
{
ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
! try
{
__c = this->rdbuf()->sgetc();
if (traits_type::eq_int_type(__c, traits_type::eof()))
__err |= ios_base::eofbit;
}
! catch(__cxxabiv1::__forced_unwind&)
{
this->_M_setstate(ios_base::badbit);
__throw_exception_again;
}
! catch(...)
{ this->_M_setstate(ios_base::badbit); }
if (__err)
this->setstate(__err);
--- 580,597 ----
if (__cerb)
{
ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
! __try
{
__c = this->rdbuf()->sgetc();
if (traits_type::eq_int_type(__c, traits_type::eof()))
__err |= ios_base::eofbit;
}
! __catch(__cxxabiv1::__forced_unwind&)
{
this->_M_setstate(ios_base::badbit);
__throw_exception_again;
}
! __catch(...)
{ this->_M_setstate(ios_base::badbit); }
if (__err)
this->setstate(__err);
*************** _GLIBCXX_BEGIN_NAMESPACE(std)
*** 609,626 ****
if (__cerb)
{
ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
! try
{
_M_gcount = this->rdbuf()->sgetn(__s, __n);
if (_M_gcount != __n)
__err |= (ios_base::eofbit | ios_base::failbit);
}
! catch(__cxxabiv1::__forced_unwind&)
{
this->_M_setstate(ios_base::badbit);
__throw_exception_again;
}
! catch(...)
{ this->_M_setstate(ios_base::badbit); }
if (__err)
this->setstate(__err);
--- 609,626 ----
if (__cerb)
{
ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
! __try
{
_M_gcount = this->rdbuf()->sgetn(__s, __n);
if (_M_gcount != __n)
__err |= (ios_base::eofbit | ios_base::failbit);
}
! __catch(__cxxabiv1::__forced_unwind&)
{
this->_M_setstate(ios_base::badbit);
__throw_exception_again;
}
! __catch(...)
{ this->_M_setstate(ios_base::badbit); }
if (__err)
this->setstate(__err);
*************** _GLIBCXX_BEGIN_NAMESPACE(std)
*** 638,644 ****
if (__cerb)
{
ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
! try
{
// Cannot compare int_type with streamsize generically.
const streamsize __num = this->rdbuf()->in_avail();
--- 638,644 ----
if (__cerb)
{
ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
! __try
{
// Cannot compare int_type with streamsize generically.
const streamsize __num = this->rdbuf()->in_avail();
*************** _GLIBCXX_BEGIN_NAMESPACE(std)
*** 647,658 ****
else if (__num == -1)
__err |= ios_base::eofbit;
}
! catch(__cxxabiv1::__forced_unwind&)
{
this->_M_setstate(ios_base::badbit);
__throw_exception_again;
}
! catch(...)
{ this->_M_setstate(ios_base::badbit); }
if (__err)
this->setstate(__err);
--- 647,658 ----
else if (__num == -1)
__err |= ios_base::eofbit;
}
! __catch(__cxxabiv1::__forced_unwind&)
{
this->_M_setstate(ios_base::badbit);
__throw_exception_again;
}
! __catch(...)
{ this->_M_setstate(ios_base::badbit); }
if (__err)
this->setstate(__err);
*************** _GLIBCXX_BEGIN_NAMESPACE(std)
*** 672,678 ****
if (__cerb)
{
ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
! try
{
const int_type __eof = traits_type::eof();
__streambuf_type* __sb = this->rdbuf();
--- 672,678 ----
if (__cerb)
{
ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
! __try
{
const int_type __eof = traits_type::eof();
__streambuf_type* __sb = this->rdbuf();
*************** _GLIBCXX_BEGIN_NAMESPACE(std)
*** 680,691 ****
|| traits_type::eq_int_type(__sb->sputbackc(__c), __eof))
__err |= ios_base::badbit;
}
! catch(__cxxabiv1::__forced_unwind&)
{
this->_M_setstate(ios_base::badbit);
__throw_exception_again;
}
! catch(...)
{ this->_M_setstate(ios_base::badbit); }
if (__err)
this->setstate(__err);
--- 680,691 ----
|| traits_type::eq_int_type(__sb->sputbackc(__c), __eof))
__err |= ios_base::badbit;
}
! __catch(__cxxabiv1::__forced_unwind&)
{
this->_M_setstate(ios_base::badbit);
__throw_exception_again;
}
! __catch(...)
{ this->_M_setstate(ios_base::badbit); }
if (__err)
this->setstate(__err);
*************** _GLIBCXX_BEGIN_NAMESPACE(std)
*** 705,711 ****
if (__cerb)
{
ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
! try
{
const int_type __eof = traits_type::eof();
__streambuf_type* __sb = this->rdbuf();
--- 705,711 ----
if (__cerb)
{
ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
! __try
{
const int_type __eof = traits_type::eof();
__streambuf_type* __sb = this->rdbuf();
*************** _GLIBCXX_BEGIN_NAMESPACE(std)
*** 713,724 ****
|| traits_type::eq_int_type(__sb->sungetc(), __eof))
__err |= ios_base::badbit;
}
! catch(__cxxabiv1::__forced_unwind&)
{
this->_M_setstate(ios_base::badbit);
__throw_exception_again;
}
! catch(...)
{ this->_M_setstate(ios_base::badbit); }
if (__err)
this->setstate(__err);
--- 713,724 ----
|| traits_type::eq_int_type(__sb->sungetc(), __eof))
__err |= ios_base::badbit;
}
! __catch(__cxxabiv1::__forced_unwind&)
{
this->_M_setstate(ios_base::badbit);
__throw_exception_again;
}
! __catch(...)
{ this->_M_setstate(ios_base::badbit); }
if (__err)
this->setstate(__err);
*************** _GLIBCXX_BEGIN_NAMESPACE(std)
*** 738,744 ****
if (__cerb)
{
ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
! try
{
__streambuf_type* __sb = this->rdbuf();
if (__sb)
--- 738,744 ----
if (__cerb)
{
ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
! __try
{
__streambuf_type* __sb = this->rdbuf();
if (__sb)
*************** _GLIBCXX_BEGIN_NAMESPACE(std)
*** 749,760 ****
__ret = 0;
}
}
! catch(__cxxabiv1::__forced_unwind&)
{
this->_M_setstate(ios_base::badbit);
__throw_exception_again;
}
! catch(...)
{ this->_M_setstate(ios_base::badbit); }
if (__err)
this->setstate(__err);
--- 749,760 ----
__ret = 0;
}
}
! __catch(__cxxabiv1::__forced_unwind&)
{
this->_M_setstate(ios_base::badbit);
__throw_exception_again;
}
! __catch(...)
{ this->_M_setstate(ios_base::badbit); }
if (__err)
this->setstate(__err);
*************** _GLIBCXX_BEGIN_NAMESPACE(std)
*** 770,787 ****
// _GLIBCXX_RESOLVE_LIB_DEFECTS
// DR60. Do not change _M_gcount.
pos_type __ret = pos_type(-1);
! try
{
if (!this->fail())
__ret = this->rdbuf()->pubseekoff(0, ios_base::cur,
ios_base::in);
}
! catch(__cxxabiv1::__forced_unwind&)
{
this->_M_setstate(ios_base::badbit);
__throw_exception_again;
}
! catch(...)
{ this->_M_setstate(ios_base::badbit); }
return __ret;
}
--- 770,787 ----
// _GLIBCXX_RESOLVE_LIB_DEFECTS
// DR60. Do not change _M_gcount.
pos_type __ret = pos_type(-1);
! __try
{
if (!this->fail())
__ret = this->rdbuf()->pubseekoff(0, ios_base::cur,
ios_base::in);
}
! __catch(__cxxabiv1::__forced_unwind&)
{
this->_M_setstate(ios_base::badbit);
__throw_exception_again;
}
! __catch(...)
{ this->_M_setstate(ios_base::badbit); }
return __ret;
}
*************** _GLIBCXX_BEGIN_NAMESPACE(std)
*** 794,800 ****
// _GLIBCXX_RESOLVE_LIB_DEFECTS
// DR60. Do not change _M_gcount.
ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
! try
{
if (!this->fail())
{
--- 794,800 ----
// _GLIBCXX_RESOLVE_LIB_DEFECTS
// DR60. Do not change _M_gcount.
ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
! __try
{
if (!this->fail())
{
*************** _GLIBCXX_BEGIN_NAMESPACE(std)
*** 807,818 ****
__err |= ios_base::failbit;
}
}
! catch(__cxxabiv1::__forced_unwind&)
{
this->_M_setstate(ios_base::badbit);
__throw_exception_again;
}
! catch(...)
{ this->_M_setstate(ios_base::badbit); }
if (__err)
this->setstate(__err);
--- 807,818 ----
__err |= ios_base::failbit;
}
}
! __catch(__cxxabiv1::__forced_unwind&)
{
this->_M_setstate(ios_base::badbit);
__throw_exception_again;
}
! __catch(...)
{ this->_M_setstate(ios_base::badbit); }
if (__err)
this->setstate(__err);
*************** _GLIBCXX_BEGIN_NAMESPACE(std)
*** 827,833 ****
// _GLIBCXX_RESOLVE_LIB_DEFECTS
// DR60. Do not change _M_gcount.
ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
! try
{
if (!this->fail())
{
--- 827,833 ----
// _GLIBCXX_RESOLVE_LIB_DEFECTS
// DR60. Do not change _M_gcount.
ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
! __try
{
if (!this->fail())
{
*************** _GLIBCXX_BEGIN_NAMESPACE(std)
*** 840,851 ****
__err |= ios_base::failbit;
}
}
! catch(__cxxabiv1::__forced_unwind&)
{
this->_M_setstate(ios_base::badbit);
__throw_exception_again;
}
! catch(...)
{ this->_M_setstate(ios_base::badbit); }
if (__err)
this->setstate(__err);
--- 840,851 ----
__err |= ios_base::failbit;
}
}
! __catch(__cxxabiv1::__forced_unwind&)
{
this->_M_setstate(ios_base::badbit);
__throw_exception_again;
}
! __catch(...)
{ this->_M_setstate(ios_base::badbit); }
if (__err)
this->setstate(__err);
*************** _GLIBCXX_BEGIN_NAMESPACE(std)
*** 864,870 ****
if (__cerb)
{
ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
! try
{
const __int_type __cb = __in.rdbuf()->sbumpc();
if (!_Traits::eq_int_type(__cb, _Traits::eof()))
--- 864,870 ----
if (__cerb)
{
ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
! __try
{
const __int_type __cb = __in.rdbuf()->sbumpc();
if (!_Traits::eq_int_type(__cb, _Traits::eof()))
*************** _GLIBCXX_BEGIN_NAMESPACE(std)
*** 872,883 ****
else
__err |= (ios_base::eofbit | ios_base::failbit);
}
! catch(__cxxabiv1::__forced_unwind&)
{
__in._M_setstate(ios_base::badbit);
__throw_exception_again;
}
! catch(...)
{ __in._M_setstate(ios_base::badbit); }
if (__err)
__in.setstate(__err);
--- 872,883 ----
else
__err |= (ios_base::eofbit | ios_base::failbit);
}
! __catch(__cxxabiv1::__forced_unwind&)
{
__in._M_setstate(ios_base::badbit);
__throw_exception_again;
}
! __catch(...)
{ __in._M_setstate(ios_base::badbit); }
if (__err)
__in.setstate(__err);
*************** _GLIBCXX_BEGIN_NAMESPACE(std)
*** 900,906 ****
typename __istream_type::sentry __cerb(__in, false);
if (__cerb)
{
! try
{
// Figure out how many characters to extract.
streamsize __num = __in.width();
--- 900,906 ----
typename __istream_type::sentry __cerb(__in, false);
if (__cerb)
{
! __try
{
// Figure out how many characters to extract.
streamsize __num = __in.width();
*************** _GLIBCXX_BEGIN_NAMESPACE(std)
*** 930,941 ****
*__s = char_type();
__in.width(0);
}
! catch(__cxxabiv1::__forced_unwind&)
{
__in._M_setstate(ios_base::badbit);
__throw_exception_again;
}
! catch(...)
{ __in._M_setstate(ios_base::badbit); }
}
if (!__extracted)
--- 930,941 ----
*__s = char_type();
__in.width(0);
}
! __catch(__cxxabiv1::__forced_unwind&)
{
__in._M_setstate(ios_base::badbit);
__throw_exception_again;
}
! __catch(...)
{ __in._M_setstate(ios_base::badbit); }
}
if (!__extracted)
Index: include/bits/stl_uninitialized.h
===================================================================
*** include/bits/stl_uninitialized.h (revision 143902)
--- include/bits/stl_uninitialized.h (working copy)
***************
*** 1,6 ****
// Raw memory manipulators -*- C++ -*-
! // Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
--- 1,6 ----
// Raw memory manipulators -*- C++ -*-
! // 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
*************** _GLIBCXX_BEGIN_NAMESPACE(std)
*** 73,86 ****
_ForwardIterator __result)
{
_ForwardIterator __cur = __result;
! try
{
for (; __first != __last; ++__first, ++__cur)
::new(static_cast<void*>(&*__cur)) typename
iterator_traits<_ForwardIterator>::value_type(*__first);
return __cur;
}
! catch(...)
{
std::_Destroy(__result, __cur);
__throw_exception_again;
--- 73,86 ----
_ForwardIterator __result)
{
_ForwardIterator __cur = __result;
! __try
{
for (; __first != __last; ++__first, ++__cur)
::new(static_cast<void*>(&*__cur)) typename
iterator_traits<_ForwardIterator>::value_type(*__first);
return __cur;
}
! __catch(...)
{
std::_Destroy(__result, __cur);
__throw_exception_again;
*************** _GLIBCXX_BEGIN_NAMESPACE(std)
*** 132,143 ****
_ForwardIterator __last, const _Tp& __x)
{
_ForwardIterator __cur = __first;
! try
{
for (; __cur != __last; ++__cur)
std::_Construct(&*__cur, __x);
}
! catch(...)
{
std::_Destroy(__first, __cur);
__throw_exception_again;
--- 132,143 ----
_ForwardIterator __last, const _Tp& __x)
{
_ForwardIterator __cur = __first;
! __try
{
for (; __cur != __last; ++__cur)
std::_Construct(&*__cur, __x);
}
! __catch(...)
{
std::_Destroy(__first, __cur);
__throw_exception_again;
*************** _GLIBCXX_BEGIN_NAMESPACE(std)
*** 186,197 ****
const _Tp& __x)
{
_ForwardIterator __cur = __first;
! try
{
for (; __n > 0; --__n, ++__cur)
std::_Construct(&*__cur, __x);
}
! catch(...)
{
std::_Destroy(__first, __cur);
__throw_exception_again;
--- 186,197 ----
const _Tp& __x)
{
_ForwardIterator __cur = __first;
! __try
{
for (; __n > 0; --__n, ++__cur)
std::_Construct(&*__cur, __x);
}
! __catch(...)
{
std::_Destroy(__first, __cur);
__throw_exception_again;
*************** _GLIBCXX_BEGIN_NAMESPACE(std)
*** 242,254 ****
_ForwardIterator __result, _Allocator& __alloc)
{
_ForwardIterator __cur = __result;
! try
{
for (; __first != __last; ++__first, ++__cur)
__alloc.construct(&*__cur, *__first);
return __cur;
}
! catch(...)
{
std::_Destroy(__result, __cur, __alloc);
__throw_exception_again;
--- 242,254 ----
_ForwardIterator __result, _Allocator& __alloc)
{
_ForwardIterator __cur = __result;
! __try
{
for (; __first != __last; ++__first, ++__cur)
__alloc.construct(&*__cur, *__first);
return __cur;
}
! __catch(...)
{
std::_Destroy(__result, __cur, __alloc);
__throw_exception_again;
*************** _GLIBCXX_BEGIN_NAMESPACE(std)
*** 278,289 ****
const _Tp& __x, _Allocator& __alloc)
{
_ForwardIterator __cur = __first;
! try
{
for (; __cur != __last; ++__cur)
__alloc.construct(&*__cur, __x);
}
! catch(...)
{
std::_Destroy(__first, __cur, __alloc);
__throw_exception_again;
--- 278,289 ----
const _Tp& __x, _Allocator& __alloc)
{
_ForwardIterator __cur = __first;
! __try
{
for (; __cur != __last; ++__cur)
__alloc.construct(&*__cur, __x);
}
! __catch(...)
{
std::_Destroy(__first, __cur, __alloc);
__throw_exception_again;
*************** _GLIBCXX_BEGIN_NAMESPACE(std)
*** 303,314 ****
const _Tp& __x, _Allocator& __alloc)
{
_ForwardIterator __cur = __first;
! try
{
for (; __n > 0; --__n, ++__cur)
__alloc.construct(&*__cur, __x);
}
! catch(...)
{
std::_Destroy(__first, __cur, __alloc);
__throw_exception_again;
--- 303,314 ----
const _Tp& __x, _Allocator& __alloc)
{
_ForwardIterator __cur = __first;
! __try
{
for (; __n > 0; --__n, ++__cur)
__alloc.construct(&*__cur, __x);
}
! __catch(...)
{
std::_Destroy(__first, __cur, __alloc);
__throw_exception_again;
*************** _GLIBCXX_BEGIN_NAMESPACE(std)
*** 345,355 ****
_ForwardIterator __mid = std::__uninitialized_copy_a(__first1, __last1,
__result,
__alloc);
! try
{
return std::__uninitialized_move_a(__first2, __last2, __mid, __alloc);
}
! catch(...)
{
std::_Destroy(__result, __mid, __alloc);
__throw_exception_again;
--- 345,355 ----
_ForwardIterator __mid = std::__uninitialized_copy_a(__first1, __last1,
__result,
__alloc);
! __try
{
return std::__uninitialized_move_a(__first2, __last2, __mid, __alloc);
}
! __catch(...)
{
std::_Destroy(__result, __mid, __alloc);
__throw_exception_again;
*************** _GLIBCXX_BEGIN_NAMESPACE(std)
*** 373,383 ****
_ForwardIterator __mid = std::__uninitialized_move_a(__first1, __last1,
__result,
__alloc);
! try
{
return std::__uninitialized_copy_a(__first2, __last2, __mid, __alloc);
}
! catch(...)
{
std::_Destroy(__result, __mid, __alloc);
__throw_exception_again;
--- 373,383 ----
_ForwardIterator __mid = std::__uninitialized_move_a(__first1, __last1,
__result,
__alloc);
! __try
{
return std::__uninitialized_copy_a(__first2, __last2, __mid, __alloc);
}
! __catch(...)
{
std::_Destroy(__result, __mid, __alloc);
__throw_exception_again;
*************** _GLIBCXX_BEGIN_NAMESPACE(std)
*** 395,405 ****
_InputIterator __last, _Allocator& __alloc)
{
std::__uninitialized_fill_a(__result, __mid, __x, __alloc);
! try
{
return std::__uninitialized_move_a(__first, __last, __mid, __alloc);
}
! catch(...)
{
std::_Destroy(__result, __mid, __alloc);
__throw_exception_again;
--- 395,405 ----
_InputIterator __last, _Allocator& __alloc)
{
std::__uninitialized_fill_a(__result, __mid, __x, __alloc);
! __try
{
return std::__uninitialized_move_a(__first, __last, __mid, __alloc);
}
! __catch(...)
{
std::_Destroy(__result, __mid, __alloc);
__throw_exception_again;
*************** _GLIBCXX_BEGIN_NAMESPACE(std)
*** 420,430 ****
_ForwardIterator __mid2 = std::__uninitialized_move_a(__first1, __last1,
__first2,
__alloc);
! try
{
std::__uninitialized_fill_a(__mid2, __last2, __x, __alloc);
}
! catch(...)
{
std::_Destroy(__first2, __mid2, __alloc);
__throw_exception_again;
--- 420,430 ----
_ForwardIterator __mid2 = std::__uninitialized_move_a(__first1, __last1,
__first2,
__alloc);
! __try
{
std::__uninitialized_fill_a(__mid2, __last2, __x, __alloc);
}
! __catch(...)
{
std::_Destroy(__first2, __mid2, __alloc);
__throw_exception_again;
*************** _GLIBCXX_BEGIN_NAMESPACE(std)
*** 439,452 ****
_ForwardIterator __result, input_iterator_tag)
{
_ForwardIterator __cur = __result;
! try
{
for (; __n > 0; --__n, ++__first, ++__cur)
::new(static_cast<void*>(&*__cur)) typename
iterator_traits<_ForwardIterator>::value_type(*__first);
return __cur;
}
! catch(...)
{
std::_Destroy(__result, __cur);
__throw_exception_again;
--- 439,452 ----
_ForwardIterator __result, input_iterator_tag)
{
_ForwardIterator __cur = __result;
! __try
{
for (; __n > 0; --__n, ++__first, ++__cur)
::new(static_cast<void*>(&*__cur)) typename
iterator_traits<_ForwardIterator>::value_type(*__first);
return __cur;
}
! __catch(...)
{
std::_Destroy(__result, __cur);
__throw_exception_again;
Index: include/bits/ostream.tcc
===================================================================
*** include/bits/ostream.tcc (revision 143902)
--- include/bits/ostream.tcc (working copy)
***************
*** 1,7 ****
// ostream classes -*- C++ -*-
// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
! // 2006, 2007
// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
--- 1,7 ----
// ostream classes -*- C++ -*-
// 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
*************** _GLIBCXX_BEGIN_NAMESPACE(std)
*** 72,89 ****
if (__cerb)
{
ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
! 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&)
{
this->_M_setstate(ios_base::badbit);
__throw_exception_again;
}
! catch(...)
{ this->_M_setstate(ios_base::badbit); }
if (__err)
this->setstate(__err);
--- 72,89 ----
if (__cerb)
{
ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
! __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&)
{
this->_M_setstate(ios_base::badbit);
__throw_exception_again;
}
! __catch(...)
{ this->_M_setstate(ios_base::badbit); }
if (__err)
this->setstate(__err);
*************** _GLIBCXX_BEGIN_NAMESPACE(std)
*** 128,144 ****
sentry __cerb(*this);
if (__cerb && __sbin)
{
! try
{
if (!__copy_streambufs(__sbin, this->rdbuf()))
__err |= ios_base::failbit;
}
! catch(__cxxabiv1::__forced_unwind&)
{
this->_M_setstate(ios_base::badbit);
__throw_exception_again;
}
! catch(...)
{ this->_M_setstate(ios_base::failbit); }
}
else if (!__sbin)
--- 128,144 ----
sentry __cerb(*this);
if (__cerb && __sbin)
{
! __try
{
if (!__copy_streambufs(__sbin, this->rdbuf()))
__err |= ios_base::failbit;
}
! __catch(__cxxabiv1::__forced_unwind&)
{
this->_M_setstate(ios_base::badbit);
__throw_exception_again;
}
! __catch(...)
{ this->_M_setstate(ios_base::failbit); }
}
else if (!__sbin)
*************** _GLIBCXX_BEGIN_NAMESPACE(std)
*** 163,180 ****
if (__cerb)
{
ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
! 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&)
{
this->_M_setstate(ios_base::badbit);
__throw_exception_again;
}
! catch(...)
{ this->_M_setstate(ios_base::badbit); }
if (__err)
this->setstate(__err);
--- 163,180 ----
if (__cerb)
{
ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
! __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&)
{
this->_M_setstate(ios_base::badbit);
__throw_exception_again;
}
! __catch(...)
{ this->_M_setstate(ios_base::badbit); }
if (__err)
this->setstate(__err);
*************** _GLIBCXX_BEGIN_NAMESPACE(std)
*** 197,210 ****
sentry __cerb(*this);
if (__cerb)
{
! try
{ _M_write(__s, __n); }
! catch(__cxxabiv1::__forced_unwind&)
{
this->_M_setstate(ios_base::badbit);
__throw_exception_again;
}
! catch(...)
{ this->_M_setstate(ios_base::badbit); }
}
return *this;
--- 197,210 ----
sentry __cerb(*this);
if (__cerb)
{
! __try
{ _M_write(__s, __n); }
! __catch(__cxxabiv1::__forced_unwind&)
{
this->_M_setstate(ios_base::badbit);
__throw_exception_again;
}
! __catch(...)
{ this->_M_setstate(ios_base::badbit); }
}
return *this;
*************** _GLIBCXX_BEGIN_NAMESPACE(std)
*** 219,235 ****
// 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
{
if (this->rdbuf() && this->rdbuf()->pubsync() == -1)
__err |= ios_base::badbit;
}
! catch(__cxxabiv1::__forced_unwind&)
{
this->_M_setstate(ios_base::badbit);
__throw_exception_again;
}
! catch(...)
{ this->_M_setstate(ios_base::badbit); }
if (__err)
this->setstate(__err);
--- 219,235 ----
// 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
{
if (this->rdbuf() && this->rdbuf()->pubsync() == -1)
__err |= ios_base::badbit;
}
! __catch(__cxxabiv1::__forced_unwind&)
{
this->_M_setstate(ios_base::badbit);
__throw_exception_again;
}
! __catch(...)
{ this->_M_setstate(ios_base::badbit); }
if (__err)
this->setstate(__err);
*************** _GLIBCXX_BEGIN_NAMESPACE(std)
*** 242,258 ****
tellp()
{
pos_type __ret = pos_type(-1);
! try
{
if (!this->fail())
__ret = this->rdbuf()->pubseekoff(0, ios_base::cur, ios_base::out);
}
! catch(__cxxabiv1::__forced_unwind&)
{
this->_M_setstate(ios_base::badbit);
__throw_exception_again;
}
! catch(...)
{ this->_M_setstate(ios_base::badbit); }
return __ret;
}
--- 242,258 ----
tellp()
{
pos_type __ret = pos_type(-1);
! __try
{
if (!this->fail())
__ret = this->rdbuf()->pubseekoff(0, ios_base::cur, ios_base::out);
}
! __catch(__cxxabiv1::__forced_unwind&)
{
this->_M_setstate(ios_base::badbit);
__throw_exception_again;
}
! __catch(...)
{ this->_M_setstate(ios_base::badbit); }
return __ret;
}
*************** _GLIBCXX_BEGIN_NAMESPACE(std)
*** 263,269 ****
seekp(pos_type __pos)
{
ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
! try
{
if (!this->fail())
{
--- 263,269 ----
seekp(pos_type __pos)
{
ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
! __try
{
if (!this->fail())
{
*************** _GLIBCXX_BEGIN_NAMESPACE(std)
*** 277,288 ****
__err |= ios_base::failbit;
}
}
! catch(__cxxabiv1::__forced_unwind&)
{
this->_M_setstate(ios_base::badbit);
__throw_exception_again;
}
! catch(...)
{ this->_M_setstate(ios_base::badbit); }
if (__err)
this->setstate(__err);
--- 277,288 ----
__err |= ios_base::failbit;
}
}
! __catch(__cxxabiv1::__forced_unwind&)
{
this->_M_setstate(ios_base::badbit);
__throw_exception_again;
}
! __catch(...)
{ this->_M_setstate(ios_base::badbit); }
if (__err)
this->setstate(__err);
*************** _GLIBCXX_BEGIN_NAMESPACE(std)
*** 295,301 ****
seekp(off_type __off, ios_base::seekdir __dir)
{
ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
! try
{
if (!this->fail())
{
--- 295,301 ----
seekp(off_type __off, ios_base::seekdir __dir)
{
ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
! __try
{
if (!this->fail())
{
*************** _GLIBCXX_BEGIN_NAMESPACE(std)
*** 309,320 ****
__err |= ios_base::failbit;
}
}
! catch(__cxxabiv1::__forced_unwind&)
{
this->_M_setstate(ios_base::badbit);
__throw_exception_again;
}
! catch(...)
{ this->_M_setstate(ios_base::badbit); }
if (__err)
this->setstate(__err);
--- 309,320 ----
__err |= ios_base::failbit;
}
}
! __catch(__cxxabiv1::__forced_unwind&)
{
this->_M_setstate(ios_base::badbit);
__throw_exception_again;
}
! __catch(...)
{ this->_M_setstate(ios_base::badbit); }
if (__err)
this->setstate(__err);
*************** _GLIBCXX_BEGIN_NAMESPACE(std)
*** 332,338 ****
// _GLIBCXX_RESOLVE_LIB_DEFECTS
// 167. Improper use of traits_type::length()
const size_t __clen = char_traits<char>::length(__s);
! try
{
struct __ptr_guard
{
--- 332,338 ----
// _GLIBCXX_RESOLVE_LIB_DEFECTS
// 167. Improper use of traits_type::length()
const size_t __clen = char_traits<char>::length(__s);
! __try
{
struct __ptr_guard
{
*************** _GLIBCXX_BEGIN_NAMESPACE(std)
*** 347,358 ****
__ws[__i] = __out.widen(__s[__i]);
__ostream_insert(__out, __ws, __clen);
}
! catch(__cxxabiv1::__forced_unwind&)
{
__out._M_setstate(ios_base::badbit);
__throw_exception_again;
}
! catch(...)
{ __out._M_setstate(ios_base::badbit); }
}
return __out;
--- 347,358 ----
__ws[__i] = __out.widen(__s[__i]);
__ostream_insert(__out, __ws, __clen);
}
! __catch(__cxxabiv1::__forced_unwind&)
{
__out._M_setstate(ios_base::badbit);
__throw_exception_again;
}
! __catch(...)
{ __out._M_setstate(ios_base::badbit); }
}
return __out;
Index: include/bits/vector.tcc
===================================================================
*** include/bits/vector.tcc (revision 143902)
--- include/bits/vector.tcc (working copy)
***************
*** 1,6 ****
// Vector implementation (out of line) -*- C++ -*-
! // Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
--- 1,6 ----
// Vector implementation (out of line) -*- C++ -*-
! // 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
*************** _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GL
*** 326,332 ****
const size_type __elems_before = __position - begin();
pointer __new_start(this->_M_allocate(__len));
pointer __new_finish(__new_start);
! try
{
// The order of the three operations is dictated by the C++0x
// case, where the moves could alter a new element belonging
--- 326,332 ----
const size_type __elems_before = __position - begin();
pointer __new_start(this->_M_allocate(__len));
pointer __new_finish(__new_start);
! __try
{
// The order of the three operations is dictated by the C++0x
// case, where the moves could alter a new element belonging
*************** _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GL
*** 352,358 ****
__new_finish,
_M_get_Tp_allocator());
}
! catch(...)
{
if (!__new_finish)
this->_M_impl.destroy(__new_start + __elems_before);
--- 352,358 ----
__new_finish,
_M_get_Tp_allocator());
}
! __catch(...)
{
if (!__new_finish)
this->_M_impl.destroy(__new_start + __elems_before);
*************** _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GL
*** 418,424 ****
const size_type __elems_before = __position - begin();
pointer __new_start(this->_M_allocate(__len));
pointer __new_finish(__new_start);
! try
{
// See _M_insert_aux above.
std::__uninitialized_fill_n_a(__new_start + __elems_before,
--- 418,424 ----
const size_type __elems_before = __position - begin();
pointer __new_start(this->_M_allocate(__len));
pointer __new_finish(__new_start);
! __try
{
// See _M_insert_aux above.
std::__uninitialized_fill_n_a(__new_start + __elems_before,
*************** _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GL
*** 439,445 ****
__new_finish,
_M_get_Tp_allocator());
}
! catch(...)
{
if (!__new_finish)
std::_Destroy(__new_start + __elems_before,
--- 439,445 ----
__new_finish,
_M_get_Tp_allocator());
}
! __catch(...)
{
if (!__new_finish)
std::_Destroy(__new_start + __elems_before,
*************** _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GL
*** 525,531 ****
_M_check_len(__n, "vector::_M_range_insert");
pointer __new_start(this->_M_allocate(__len));
pointer __new_finish(__new_start);
! try
{
__new_finish =
std::__uninitialized_move_a(this->_M_impl._M_start,
--- 525,531 ----
_M_check_len(__n, "vector::_M_range_insert");
pointer __new_start(this->_M_allocate(__len));
pointer __new_finish(__new_start);
! __try
{
__new_finish =
std::__uninitialized_move_a(this->_M_impl._M_start,
*************** _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GL
*** 542,548 ****
__new_finish,
_M_get_Tp_allocator());
}
! catch(...)
{
std::_Destroy(__new_start, __new_finish,
_M_get_Tp_allocator());
--- 542,548 ----
__new_finish,
_M_get_Tp_allocator());
}
! __catch(...)
{
std::_Destroy(__new_start, __new_finish,
_M_get_Tp_allocator());
Index: include/bits/stl_tempbuf.h
===================================================================
*** include/bits/stl_tempbuf.h (revision 143902)
--- include/bits/stl_tempbuf.h (working copy)
***************
*** 1,6 ****
// Temporary buffer implementation -*- C++ -*-
! // Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
--- 1,6 ----
// Temporary buffer implementation -*- C++ -*-
! // 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
*************** _GLIBCXX_BEGIN_NAMESPACE(std)
*** 187,193 ****
: _M_original_len(std::distance(__first, __last)),
_M_len(0), _M_buffer(0)
{
! try
{
std::pair<pointer, size_type> __p(std::get_temporary_buffer<
value_type>(_M_original_len));
--- 187,193 ----
: _M_original_len(std::distance(__first, __last)),
_M_len(0), _M_buffer(0)
{
! __try
{
std::pair<pointer, size_type> __p(std::get_temporary_buffer<
value_type>(_M_original_len));
*************** _GLIBCXX_BEGIN_NAMESPACE(std)
*** 196,202 ****
if (!__is_pod(_Tp) && _M_len > 0)
std::uninitialized_fill_n(_M_buffer, _M_len, *__first);
}
! catch(...)
{
std::return_temporary_buffer(_M_buffer);
_M_buffer = 0;
--- 196,202 ----
if (!__is_pod(_Tp) && _M_len > 0)
std::uninitialized_fill_n(_M_buffer, _M_len, *__first);
}
! __catch(...)
{
std::return_temporary_buffer(_M_buffer);
_M_buffer = 0;
Index: include/bits/deque.tcc
===================================================================
*** include/bits/deque.tcc (revision 143902)
--- include/bits/deque.tcc (working copy)
***************
*** 1,6 ****
// Deque implementation (out of line) -*- C++ -*-
! // Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
--- 1,6 ----
// Deque implementation (out of line) -*- C++ -*-
! // 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
*************** _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GL
*** 242,254 ****
if (__pos._M_cur == this->_M_impl._M_start._M_cur)
{
iterator __new_start = _M_reserve_elements_at_front(__n);
! 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(...)
{
_M_destroy_nodes(__new_start._M_node,
this->_M_impl._M_start._M_node);
--- 242,254 ----
if (__pos._M_cur == this->_M_impl._M_start._M_cur)
{
iterator __new_start = _M_reserve_elements_at_front(__n);
! __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(...)
{
_M_destroy_nodes(__new_start._M_node,
this->_M_impl._M_start._M_node);
*************** _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GL
*** 258,271 ****
else if (__pos._M_cur == this->_M_impl._M_finish._M_cur)
{
iterator __new_finish = _M_reserve_elements_at_back(__n);
! 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(...)
{
_M_destroy_nodes(this->_M_impl._M_finish._M_node + 1,
__new_finish._M_node + 1);
--- 258,271 ----
else if (__pos._M_cur == this->_M_impl._M_finish._M_cur)
{
iterator __new_finish = _M_reserve_elements_at_back(__n);
! __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(...)
{
_M_destroy_nodes(this->_M_impl._M_finish._M_node + 1,
__new_finish._M_node + 1);
*************** _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GL
*** 282,288 ****
_M_fill_initialize(const value_type& __value)
{
_Map_pointer __cur;
! try
{
for (__cur = this->_M_impl._M_start._M_node;
__cur < this->_M_impl._M_finish._M_node;
--- 282,288 ----
_M_fill_initialize(const value_type& __value)
{
_Map_pointer __cur;
! __try
{
for (__cur = this->_M_impl._M_start._M_node;
__cur < this->_M_impl._M_finish._M_node;
*************** _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GL
*** 293,299 ****
this->_M_impl._M_finish._M_cur,
__value, _M_get_Tp_allocator());
}
! catch(...)
{
std::_Destroy(this->_M_impl._M_start, iterator(*__cur, __cur),
_M_get_Tp_allocator());
--- 293,299 ----
this->_M_impl._M_finish._M_cur,
__value, _M_get_Tp_allocator());
}
! __catch(...)
{
std::_Destroy(this->_M_impl._M_start, iterator(*__cur, __cur),
_M_get_Tp_allocator());
*************** _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GL
*** 309,320 ****
std::input_iterator_tag)
{
this->_M_initialize_map(0);
! try
{
for (; __first != __last; ++__first)
push_back(*__first);
}
! catch(...)
{
clear();
__throw_exception_again;
--- 309,320 ----
std::input_iterator_tag)
{
this->_M_initialize_map(0);
! __try
{
for (; __first != __last; ++__first)
push_back(*__first);
}
! __catch(...)
{
clear();
__throw_exception_again;
*************** _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GL
*** 332,338 ****
this->_M_initialize_map(__n);
_Map_pointer __cur_node;
! try
{
for (__cur_node = this->_M_impl._M_start._M_node;
__cur_node < this->_M_impl._M_finish._M_node;
--- 332,338 ----
this->_M_initialize_map(__n);
_Map_pointer __cur_node;
! __try
{
for (__cur_node = this->_M_impl._M_start._M_node;
__cur_node < this->_M_impl._M_finish._M_node;
*************** _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GL
*** 348,354 ****
this->_M_impl._M_finish._M_first,
_M_get_Tp_allocator());
}
! catch(...)
{
std::_Destroy(this->_M_impl._M_start,
iterator(*__cur_node, __cur_node),
--- 348,354 ----
this->_M_impl._M_finish._M_first,
_M_get_Tp_allocator());
}
! __catch(...)
{
std::_Destroy(this->_M_impl._M_start,
iterator(*__cur_node, __cur_node),
*************** _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GL
*** 372,378 ****
{
_M_reserve_map_at_back();
*(this->_M_impl._M_finish._M_node + 1) = this->_M_allocate_node();
! try
{
#ifdef __GXX_EXPERIMENTAL_CXX0X__
this->_M_impl.construct(this->_M_impl._M_finish._M_cur,
--- 372,378 ----
{
_M_reserve_map_at_back();
*(this->_M_impl._M_finish._M_node + 1) = this->_M_allocate_node();
! __try
{
#ifdef __GXX_EXPERIMENTAL_CXX0X__
this->_M_impl.construct(this->_M_impl._M_finish._M_cur,
*************** _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GL
*** 384,390 ****
+ 1);
this->_M_impl._M_finish._M_cur = this->_M_impl._M_finish._M_first;
}
! catch(...)
{
_M_deallocate_node(*(this->_M_impl._M_finish._M_node + 1));
__throw_exception_again;
--- 384,390 ----
+ 1);
this->_M_impl._M_finish._M_cur = this->_M_impl._M_finish._M_first;
}
! __catch(...)
{
_M_deallocate_node(*(this->_M_impl._M_finish._M_node + 1));
__throw_exception_again;
*************** _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GL
*** 406,412 ****
{
_M_reserve_map_at_front();
*(this->_M_impl._M_start._M_node - 1) = this->_M_allocate_node();
! try
{
this->_M_impl._M_start._M_set_node(this->_M_impl._M_start._M_node
- 1);
--- 406,412 ----
{
_M_reserve_map_at_front();
*(this->_M_impl._M_start._M_node - 1) = this->_M_allocate_node();
! __try
{
this->_M_impl._M_start._M_set_node(this->_M_impl._M_start._M_node
- 1);
*************** _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GL
*** 418,424 ****
this->_M_impl.construct(this->_M_impl._M_start._M_cur, __t);
#endif
}
! catch(...)
{
++this->_M_impl._M_start;
_M_deallocate_node(*(this->_M_impl._M_start._M_node - 1));
--- 418,424 ----
this->_M_impl.construct(this->_M_impl._M_start._M_cur, __t);
#endif
}
! __catch(...)
{
++this->_M_impl._M_start;
_M_deallocate_node(*(this->_M_impl._M_start._M_node - 1));
*************** _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GL
*** 473,485 ****
if (__pos._M_cur == this->_M_impl._M_start._M_cur)
{
iterator __new_start = _M_reserve_elements_at_front(__n);
! try
{
std::__uninitialized_copy_a(__first, __last, __new_start,
_M_get_Tp_allocator());
this->_M_impl._M_start = __new_start;
}
! catch(...)
{
_M_destroy_nodes(__new_start._M_node,
this->_M_impl._M_start._M_node);
--- 473,485 ----
if (__pos._M_cur == this->_M_impl._M_start._M_cur)
{
iterator __new_start = _M_reserve_elements_at_front(__n);
! __try
{
std::__uninitialized_copy_a(__first, __last, __new_start,
_M_get_Tp_allocator());
this->_M_impl._M_start = __new_start;
}
! __catch(...)
{
_M_destroy_nodes(__new_start._M_node,
this->_M_impl._M_start._M_node);
*************** _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GL
*** 489,502 ****
else if (__pos._M_cur == this->_M_impl._M_finish._M_cur)
{
iterator __new_finish = _M_reserve_elements_at_back(__n);
! try
{
std::__uninitialized_copy_a(__first, __last,
this->_M_impl._M_finish,
_M_get_Tp_allocator());
this->_M_impl._M_finish = __new_finish;
}
! catch(...)
{
_M_destroy_nodes(this->_M_impl._M_finish._M_node + 1,
__new_finish._M_node + 1);
--- 489,502 ----
else if (__pos._M_cur == this->_M_impl._M_finish._M_cur)
{
iterator __new_finish = _M_reserve_elements_at_back(__n);
! __try
{
std::__uninitialized_copy_a(__first, __last,
this->_M_impl._M_finish,
_M_get_Tp_allocator());
this->_M_impl._M_finish = __new_finish;
}
! __catch(...)
{
_M_destroy_nodes(this->_M_impl._M_finish._M_node + 1,
__new_finish._M_node + 1);
*************** _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GL
*** 562,568 ****
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
{
if (__elems_before >= difference_type(__n))
{
--- 562,568 ----
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
{
if (__elems_before >= difference_type(__n))
{
*************** _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GL
*** 586,592 ****
std::fill(__old_start, __pos, __x_copy);
}
}
! catch(...)
{
_M_destroy_nodes(__new_start._M_node,
this->_M_impl._M_start._M_node);
--- 586,592 ----
std::fill(__old_start, __pos, __x_copy);
}
}
! __catch(...)
{
_M_destroy_nodes(__new_start._M_node,
this->_M_impl._M_start._M_node);
*************** _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GL
*** 600,606 ****
const difference_type __elems_after =
difference_type(__length) - __elems_before;
__pos = this->_M_impl._M_finish - __elems_after;
! try
{
if (__elems_after > difference_type(__n))
{
--- 600,606 ----
const difference_type __elems_after =
difference_type(__length) - __elems_before;
__pos = this->_M_impl._M_finish - __elems_after;
! __try
{
if (__elems_after > difference_type(__n))
{
*************** _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GL
*** 625,631 ****
std::fill(__pos, __old_finish, __x_copy);
}
}
! catch(...)
{
_M_destroy_nodes(this->_M_impl._M_finish._M_node + 1,
__new_finish._M_node + 1);
--- 625,631 ----
std::fill(__pos, __old_finish, __x_copy);
}
}
! __catch(...)
{
_M_destroy_nodes(this->_M_impl._M_finish._M_node + 1,
__new_finish._M_node + 1);
*************** _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GL
*** 649,655 ****
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
{
if (__elemsbefore >= difference_type(__n))
{
--- 649,655 ----
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
{
if (__elemsbefore >= difference_type(__n))
{
*************** _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GL
*** 674,680 ****
std::copy(__mid, __last, __old_start);
}
}
! catch(...)
{
_M_destroy_nodes(__new_start._M_node,
this->_M_impl._M_start._M_node);
--- 674,680 ----
std::copy(__mid, __last, __old_start);
}
}
! __catch(...)
{
_M_destroy_nodes(__new_start._M_node,
this->_M_impl._M_start._M_node);
*************** _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GL
*** 688,694 ****
const difference_type __elemsafter =
difference_type(__length) - __elemsbefore;
__pos = this->_M_impl._M_finish - __elemsafter;
! try
{
if (__elemsafter > difference_type(__n))
{
--- 688,694 ----
const difference_type __elemsafter =
difference_type(__length) - __elemsbefore;
__pos = this->_M_impl._M_finish - __elemsafter;
! __try
{
if (__elemsafter > difference_type(__n))
{
*************** _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GL
*** 714,720 ****
std::copy(__first, __mid, __pos);
}
}
! catch(...)
{
_M_destroy_nodes(this->_M_impl._M_finish._M_node + 1,
__new_finish._M_node + 1);
--- 714,720 ----
std::copy(__first, __mid, __pos);
}
}
! __catch(...)
{
_M_destroy_nodes(this->_M_impl._M_finish._M_node + 1,
__new_finish._M_node + 1);
*************** _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GL
*** 757,768 ****
/ _S_buffer_size());
_M_reserve_map_at_front(__new_nodes);
size_type __i;
! try
{
for (__i = 1; __i <= __new_nodes; ++__i)
*(this->_M_impl._M_start._M_node - __i) = this->_M_allocate_node();
}
! catch(...)
{
for (size_type __j = 1; __j < __i; ++__j)
_M_deallocate_node(*(this->_M_impl._M_start._M_node - __j));
--- 757,768 ----
/ _S_buffer_size());
_M_reserve_map_at_front(__new_nodes);
size_type __i;
! __try
{
for (__i = 1; __i <= __new_nodes; ++__i)
*(this->_M_impl._M_start._M_node - __i) = this->_M_allocate_node();
}
! __catch(...)
{
for (size_type __j = 1; __j < __i; ++__j)
_M_deallocate_node(*(this->_M_impl._M_start._M_node - __j));
*************** _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GL
*** 782,793 ****
/ _S_buffer_size());
_M_reserve_map_at_back(__new_nodes);
size_type __i;
! try
{
for (__i = 1; __i <= __new_nodes; ++__i)
*(this->_M_impl._M_finish._M_node + __i) = this->_M_allocate_node();
}
! catch(...)
{
for (size_type __j = 1; __j < __i; ++__j)
_M_deallocate_node(*(this->_M_impl._M_finish._M_node + __j));
--- 782,793 ----
/ _S_buffer_size());
_M_reserve_map_at_back(__new_nodes);
size_type __i;
! __try
{
for (__i = 1; __i <= __new_nodes; ++__i)
*(this->_M_impl._M_finish._M_node + __i) = this->_M_allocate_node();
}
! __catch(...)
{
for (size_type __j = 1; __j < __i; ++__j)
_M_deallocate_node(*(this->_M_impl._M_finish._M_node + __j));
Index: include/bits/basic_string.tcc
===================================================================
*** include/bits/basic_string.tcc (revision 143902)
--- include/bits/basic_string.tcc (working copy)
***************
*** 1,7 ****
// Components for manipulating sequences of characters -*- C++ -*-
// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
! // 2006, 2007
// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
--- 1,7 ----
// Components for manipulating sequences of characters -*- C++ -*-
// 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
*************** _GLIBCXX_BEGIN_NAMESPACE(std)
*** 97,103 ****
}
_Rep* __r = _Rep::_S_create(__len, size_type(0), __a);
_M_copy(__r->_M_refdata(), __buf, __len);
! try
{
while (__beg != __end)
{
--- 97,103 ----
}
_Rep* __r = _Rep::_S_create(__len, size_type(0), __a);
_M_copy(__r->_M_refdata(), __buf, __len);
! __try
{
while (__beg != __end)
{
*************** _GLIBCXX_BEGIN_NAMESPACE(std)
*** 113,119 ****
++__beg;
}
}
! catch(...)
{
__r->_M_destroy(__a);
__throw_exception_again;
--- 113,119 ----
++__beg;
}
}
! __catch(...)
{
__r->_M_destroy(__a);
__throw_exception_again;
*************** _GLIBCXX_BEGIN_NAMESPACE(std)
*** 142,150 ****
__end));
// Check for out_of_range and length_error exceptions.
_Rep* __r = _Rep::_S_create(__dnew, size_type(0), __a);
! try
{ _S_copy_chars(__r->_M_refdata(), __beg, __end); }
! catch(...)
{
__r->_M_destroy(__a);
__throw_exception_again;
--- 142,150 ----
__end));
// Check for out_of_range and length_error exceptions.
_Rep* __r = _Rep::_S_create(__dnew, size_type(0), __a);
! __try
{ _S_copy_chars(__r->_M_refdata(), __beg, __end); }
! __catch(...)
{
__r->_M_destroy(__a);
__throw_exception_again;
*************** _GLIBCXX_BEGIN_NAMESPACE(std)
*** 992,998 ****
typename __istream_type::sentry __cerb(__in, false);
if (__cerb)
{
! try
{
// Avoid reallocation for common case.
__str.erase();
--- 992,998 ----
typename __istream_type::sentry __cerb(__in, false);
if (__cerb)
{
! __try
{
// Avoid reallocation for common case.
__str.erase();
*************** _GLIBCXX_BEGIN_NAMESPACE(std)
*** 1025,1036 ****
__err |= __ios_base::eofbit;
__in.width(0);
}
! catch(__cxxabiv1::__forced_unwind&)
{
__in._M_setstate(__ios_base::badbit);
__throw_exception_again;
}
! catch(...)
{
// _GLIBCXX_RESOLVE_LIB_DEFECTS
// 91. Description of operator>> and getline() for string<>
--- 1025,1036 ----
__err |= __ios_base::eofbit;
__in.width(0);
}
! __catch(__cxxabiv1::__forced_unwind&)
{
__in._M_setstate(__ios_base::badbit);
__throw_exception_again;
}
! __catch(...)
{
// _GLIBCXX_RESOLVE_LIB_DEFECTS
// 91. Description of operator>> and getline() for string<>
*************** _GLIBCXX_BEGIN_NAMESPACE(std)
*** 1063,1069 ****
typename __istream_type::sentry __cerb(__in, true);
if (__cerb)
{
! try
{
__str.erase();
const __int_type __idelim = _Traits::to_int_type(__delim);
--- 1063,1069 ----
typename __istream_type::sentry __cerb(__in, true);
if (__cerb)
{
! __try
{
__str.erase();
const __int_type __idelim = _Traits::to_int_type(__delim);
*************** _GLIBCXX_BEGIN_NAMESPACE(std)
*** 1089,1100 ****
else
__err |= __ios_base::failbit;
}
! catch(__cxxabiv1::__forced_unwind&)
{
__in._M_setstate(__ios_base::badbit);
__throw_exception_again;
}
! catch(...)
{
// _GLIBCXX_RESOLVE_LIB_DEFECTS
// 91. Description of operator>> and getline() for string<>
--- 1089,1100 ----
else
__err |= __ios_base::failbit;
}
! __catch(__cxxabiv1::__forced_unwind&)
{
__in._M_setstate(__ios_base::badbit);
__throw_exception_again;
}
! __catch(...)
{
// _GLIBCXX_RESOLVE_LIB_DEFECTS
// 91. Description of operator>> and getline() for string<>
Index: include/bits/ostream_insert.h
===================================================================
*** include/bits/ostream_insert.h (revision 143902)
--- include/bits/ostream_insert.h (working copy)
***************
*** 1,6 ****
// Helpers for ostream inserters -*- C++ -*-
! // Copyright (C) 2007 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
--- 1,6 ----
// Helpers for ostream inserters -*- C++ -*-
! // 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
*************** _GLIBCXX_BEGIN_NAMESPACE(std)
*** 85,91 ****
typename __ostream_type::sentry __cerb(__out);
if (__cerb)
{
! try
{
const streamsize __w = __out.width();
if (__w > __n)
--- 85,91 ----
typename __ostream_type::sentry __cerb(__out);
if (__cerb)
{
! __try
{
const streamsize __w = __out.width();
if (__w > __n)
*************** _GLIBCXX_BEGIN_NAMESPACE(std)
*** 104,115 ****
__ostream_write(__out, __s, __n);
__out.width(0);
}
! catch(__cxxabiv1::__forced_unwind&)
{
__out._M_setstate(__ios_base::badbit);
__throw_exception_again;
}
! catch(...)
{ __out._M_setstate(__ios_base::badbit); }
}
return __out;
--- 104,115 ----
__ostream_write(__out, __s, __n);
__out.width(0);
}
! __catch(__cxxabiv1::__forced_unwind&)
{
__out._M_setstate(__ios_base::badbit);
__throw_exception_again;
}
! __catch(...)
{ __out._M_setstate(__ios_base::badbit); }
}
return __out;
Index: include/bits/locale_facets_nonio.tcc
===================================================================
*** include/bits/locale_facets_nonio.tcc (revision 143902)
--- include/bits/locale_facets_nonio.tcc (working copy)
***************
*** 1,6 ****
// Locale support -*- C++ -*-
! // Copyright (C) 2007, 2008 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
--- 1,6 ----
// Locale support -*- C++ -*-
! // 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
*************** _GLIBCXX_BEGIN_NAMESPACE(std)
*** 50,61 ****
if (!__caches[__i])
{
__moneypunct_cache<_CharT, _Intl>* __tmp = NULL;
! try
{
__tmp = new __moneypunct_cache<_CharT, _Intl>;
__tmp->_M_cache(__loc);
}
! catch(...)
{
delete __tmp;
__throw_exception_again;
--- 50,61 ----
if (!__caches[__i])
{
__moneypunct_cache<_CharT, _Intl>* __tmp = NULL;
! __try
{
__tmp = new __moneypunct_cache<_CharT, _Intl>;
__tmp->_M_cache(__loc);
}
! __catch(...)
{
delete __tmp;
__throw_exception_again;
Index: include/bits/stl_tree.h
===================================================================
*** include/bits/stl_tree.h (revision 143902)
--- include/bits/stl_tree.h (working copy)
***************
*** 1,6 ****
// RB tree implementation -*- C++ -*-
! // Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
--- 1,6 ----
// RB tree implementation -*- C++ -*-
! // 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
*************** _GLIBCXX_BEGIN_NAMESPACE(std)
*** 372,380 ****
_M_create_node(const value_type& __x)
{
_Link_type __tmp = _M_get_node();
! try
{ get_allocator().construct(&__tmp->_M_value_field, __x); }
! catch(...)
{
_M_put_node(__tmp);
__throw_exception_again;
--- 372,380 ----
_M_create_node(const value_type& __x)
{
_Link_type __tmp = _M_get_node();
! __try
{ get_allocator().construct(&__tmp->_M_value_field, __x); }
! __catch(...)
{
_M_put_node(__tmp);
__throw_exception_again;
*************** _GLIBCXX_BEGIN_NAMESPACE(std)
*** 394,405 ****
_M_create_node(_Args&&... __args)
{
_Link_type __tmp = _M_get_node();
! try
{
_M_get_Node_allocator().construct(__tmp,
std::forward<_Args>(__args)...);
}
! catch(...)
{
_M_put_node(__tmp);
__throw_exception_again;
--- 394,405 ----
_M_create_node(_Args&&... __args)
{
_Link_type __tmp = _M_get_node();
! __try
{
_M_get_Node_allocator().construct(__tmp,
std::forward<_Args>(__args)...);
}
! __catch(...)
{
_M_put_node(__tmp);
__throw_exception_again;
*************** _GLIBCXX_BEGIN_NAMESPACE(std)
*** 937,943 ****
_Link_type __top = _M_clone_node(__x);
__top->_M_parent = __p;
! try
{
if (__x->_M_right)
__top->_M_right = _M_copy(_S_right(__x), __top);
--- 937,943 ----
_Link_type __top = _M_clone_node(__x);
__top->_M_parent = __p;
! __try
{
if (__x->_M_right)
__top->_M_right = _M_copy(_S_right(__x), __top);
*************** _GLIBCXX_BEGIN_NAMESPACE(std)
*** 955,961 ****
__x = _S_left(__x);
}
}
! catch(...)
{
_M_erase(__top);
__throw_exception_again;
--- 955,961 ----
__x = _S_left(__x);
}
}
! __catch(...)
{
_M_erase(__top);
__throw_exception_again;
Index: include/bits/fstream.tcc
===================================================================
*** include/bits/fstream.tcc (revision 143902)
--- include/bits/fstream.tcc (working copy)
***************
*** 1,7 ****
// File based streams -*- C++ -*-
// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
! // 2007
// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
--- 1,7 ----
// File based streams -*- C++ -*-
// 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
*************** _GLIBCXX_BEGIN_NAMESPACE(std)
*** 154,170 ****
}
} __cs (this);
! try
{
if (!_M_terminate_output())
__testfail = true;
}
! catch(__cxxabiv1::__forced_unwind&)
{
_M_file.close();
__throw_exception_again;
}
! catch(...)
{ __testfail = true; }
}
--- 154,170 ----
}
} __cs (this);
! __try
{
if (!_M_terminate_output())
__testfail = true;
}
! __catch(__cxxabiv1::__forced_unwind&)
{
_M_file.close();
__throw_exception_again;
}
! __catch(...)
{ __testfail = true; }
}
Index: include/tr1/shared_ptr.h
===================================================================
*** include/tr1/shared_ptr.h (revision 143902)
--- include/tr1/shared_ptr.h (working copy)
***************
*** 1,6 ****
// <tr1/shared_ptr.h> -*- C++ -*-
! // Copyright (C) 2007, 2008 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
--- 1,6 ----
// <tr1/shared_ptr.h> -*- C++ -*-
! // 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
*************** namespace tr1
*** 110,122 ****
template<typename _Ptr>
__shared_count(_Ptr __p) : _M_pi(0)
{
! 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(...)
{
delete __p;
__throw_exception_again;
--- 110,122 ----
template<typename _Ptr>
__shared_count(_Ptr __p) : _M_pi(0)
{
! __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(...)
{
delete __p;
__throw_exception_again;
*************** namespace tr1
*** 126,136 ****
template<typename _Ptr, typename _Deleter>
__shared_count(_Ptr __p, _Deleter __d) : _M_pi(0)
{
! try
{
_M_pi = new _Sp_counted_base_impl<_Ptr, _Deleter, _Lp>(__p, __d);
}
! catch(...)
{
__d(__p); // Call _Deleter on __p.
__throw_exception_again;
--- 126,136 ----
template<typename _Ptr, typename _Deleter>
__shared_count(_Ptr __p, _Deleter __d) : _M_pi(0)
{
! __try
{
_M_pi = new _Sp_counted_base_impl<_Ptr, _Deleter, _Lp>(__p, __d);
}
! __catch(...)
{
__d(__p); // Call _Deleter on __p.
__throw_exception_again;
*************** namespace tr1
*** 709,719 ****
if (expired())
return __shared_ptr<element_type, _Lp>();
! try
{
return __shared_ptr<element_type, _Lp>(*this);
}
! catch(const bad_weak_ptr&)
{
// Q: How can we get here?
// A: Another thread may have invalidated r after the
--- 709,719 ----
if (expired())
return __shared_ptr<element_type, _Lp>();
! __try
{
return __shared_ptr<element_type, _Lp>(*this);
}
! __catch(const bad_weak_ptr&)
{
// Q: How can we get here?
// A: Another thread may have invalidated r after the
*************** namespace tr1
*** 958,968 ****
if (this->expired())
return shared_ptr<_Tp>();
! try
{
return shared_ptr<_Tp>(*this);
}
! catch(const bad_weak_ptr&)
{
return shared_ptr<_Tp>();
}
--- 958,968 ----
if (this->expired())
return shared_ptr<_Tp>();
! __try
{
return shared_ptr<_Tp>(*this);
}
! __catch(const bad_weak_ptr&)
{
return shared_ptr<_Tp>();
}
Index: include/tr1/hypergeometric.tcc
===================================================================
*** include/tr1/hypergeometric.tcc (revision 143902)
--- include/tr1/hypergeometric.tcc (working copy)
***************
*** 1,6 ****
// Special functions -*- C++ -*-
! // Copyright (C) 2006, 2007, 2008
// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
--- 1,6 ----
// Special functions -*- C++ -*-
! // Copyright (C) 2006, 2007, 2008, 2009
// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
*************** namespace tr1
*** 477,489 ****
bool __ok_d1 = true;
_Tp __lng_ad, __lng_ad1, __lng_bd1;
! try
{
__lng_ad = __log_gamma(__ad);
__lng_ad1 = __log_gamma(__a + __d1);
__lng_bd1 = __log_gamma(__b + __d1);
}
! catch(...)
{
__ok_d1 = false;
}
--- 477,489 ----
bool __ok_d1 = true;
_Tp __lng_ad, __lng_ad1, __lng_bd1;
! __try
{
__lng_ad = __log_gamma(__ad);
__lng_ad1 = __log_gamma(__a + __d1);
__lng_bd1 = __log_gamma(__b + __d1);
}
! __catch(...)
{
__ok_d1 = false;
}
*************** namespace tr1
*** 525,536 ****
// Evaluate F2.
bool __ok_d2 = true;
_Tp __lng_ad2, __lng_bd2;
! try
{
__lng_ad2 = __log_gamma(__a + __d2);
__lng_bd2 = __log_gamma(__b + __d2);
}
! catch(...)
{
__ok_d2 = false;
}
--- 525,536 ----
// Evaluate F2.
bool __ok_d2 = true;
_Tp __lng_ad2, __lng_bd2;
! __try
{
__lng_ad2 = __log_gamma(__a + __d2);
__lng_bd2 = __log_gamma(__b + __d2);
}
! __catch(...)
{
__ok_d2 = false;
}
*************** namespace tr1
*** 600,613 ****
bool __ok1 = true;
_Tp __sgn_g1ca = _Tp(0), __ln_g1ca = _Tp(0);
_Tp __sgn_g1cb = _Tp(0), __ln_g1cb = _Tp(0);
! 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(...)
{
__ok1 = false;
}
--- 600,613 ----
bool __ok1 = true;
_Tp __sgn_g1ca = _Tp(0), __ln_g1ca = _Tp(0);
_Tp __sgn_g1cb = _Tp(0), __ln_g1cb = _Tp(0);
! __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(...)
{
__ok1 = false;
}
*************** namespace tr1
*** 615,628 ****
bool __ok2 = true;
_Tp __sgn_g2a = _Tp(0), __ln_g2a = _Tp(0);
_Tp __sgn_g2b = _Tp(0), __ln_g2b = _Tp(0);
! try
{
__sgn_g2a = __log_gamma_sign(__a);
__ln_g2a = __log_gamma(__a);
__sgn_g2b = __log_gamma_sign(__b);
__ln_g2b = __log_gamma(__b);
}
! catch(...)
{
__ok2 = false;
}
--- 615,628 ----
bool __ok2 = true;
_Tp __sgn_g2a = _Tp(0), __ln_g2a = _Tp(0);
_Tp __sgn_g2b = _Tp(0), __ln_g2b = _Tp(0);
! __try
{
__sgn_g2a = __log_gamma_sign(__a);
__ln_g2a = __log_gamma(__a);
__sgn_g2b = __log_gamma_sign(__b);
__ln_g2b = __log_gamma(__b);
}
! __catch(...)
{
__ok2 = false;
}
Index: include/backward/hashtable.h
===================================================================
*** include/backward/hashtable.h (revision 143902)
--- include/backward/hashtable.h (working copy)
***************
*** 1,6 ****
// Hashtable implementation used by containers -*- C++ -*-
! // Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007
// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
--- 1,6 ----
// Hashtable implementation used by containers -*- C++ -*-
! // 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
*************** _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
*** 603,614 ****
{
_Node* __n = _M_get_node();
__n->_M_next = 0;
! try
{
this->get_allocator().construct(&__n->_M_val, __obj);
return __n;
}
! catch(...)
{
_M_put_node(__n);
__throw_exception_again;
--- 603,614 ----
{
_Node* __n = _M_get_node();
__n->_M_next = 0;
! __try
{
this->get_allocator().construct(&__n->_M_val, __obj);
return __n;
}
! __catch(...)
{
_M_put_node(__n);
__throw_exception_again;
*************** _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
*** 995,1001 ****
if (__n > __old_n)
{
_Vector_type __tmp(__n, (_Node*)(0), _M_buckets.get_allocator());
! try
{
for (size_type __bucket = 0; __bucket < __old_n; ++__bucket)
{
--- 995,1001 ----
if (__n > __old_n)
{
_Vector_type __tmp(__n, (_Node*)(0), _M_buckets.get_allocator());
! __try
{
for (size_type __bucket = 0; __bucket < __old_n; ++__bucket)
{
*************** _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
*** 1012,1018 ****
}
_M_buckets.swap(__tmp);
}
! catch(...)
{
for (size_type __bucket = 0; __bucket < __tmp.size();
++__bucket)
--- 1012,1018 ----
}
_M_buckets.swap(__tmp);
}
! __catch(...)
{
for (size_type __bucket = 0; __bucket < __tmp.size();
++__bucket)
*************** _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
*** 1098,1104 ****
_M_buckets.clear();
_M_buckets.reserve(__ht._M_buckets.size());
_M_buckets.insert(_M_buckets.end(), __ht._M_buckets.size(), (_Node*) 0);
! try
{
for (size_type __i = 0; __i < __ht._M_buckets.size(); ++__i) {
const _Node* __cur = __ht._M_buckets[__i];
--- 1098,1104 ----
_M_buckets.clear();
_M_buckets.reserve(__ht._M_buckets.size());
_M_buckets.insert(_M_buckets.end(), __ht._M_buckets.size(), (_Node*) 0);
! __try
{
for (size_type __i = 0; __i < __ht._M_buckets.size(); ++__i) {
const _Node* __cur = __ht._M_buckets[__i];
*************** _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
*** 1118,1124 ****
}
_M_num_elements = __ht._M_num_elements;
}
! catch(...)
{
clear();
__throw_exception_again;
--- 1118,1124 ----
}
_M_num_elements = __ht._M_num_elements;
}
! __catch(...)
{
clear();
__throw_exception_again;
Index: libsupc++/exception_defines.h
===================================================================
*** libsupc++/exception_defines.h (revision 143902)
--- libsupc++/exception_defines.h (working copy)
***************
*** 1,6 ****
// -fno-exceptions Support -*- C++ -*-
! // Copyright (C) 2001, 2003 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
--- 1,7 ----
// -fno-exceptions Support -*- C++ -*-
! // 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,50 ****
#ifndef __EXCEPTIONS
// Iff -fno-exceptions, transform error handling code to work without it.
! # define try if (true)
! # define catch(X) if (false)
# define __throw_exception_again
#else
// Else proceed normally.
# define __throw_exception_again throw
#endif
--- 41,53 ----
#ifndef __EXCEPTIONS
// Iff -fno-exceptions, transform error handling code to work without it.
! # 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
Index: libsupc++/exception_ptr.h
===================================================================
*** libsupc++/exception_ptr.h (revision 143902)
--- libsupc++/exception_ptr.h (working copy)
***************
*** 1,6 ****
// Exception Handling support header (exception_ptr class) for -*- C++ -*-
! // Copyright (C) 2008 Free Software Foundation
//
// This file is part of GCC.
//
--- 1,6 ----
// Exception Handling support header (exception_ptr class) for -*- C++ -*-
! // Copyright (C) 2008, 2009 Free Software Foundation
//
// This file is part of GCC.
//
***************
*** 39,44 ****
--- 39,45 ----
#pragma GCC visibility push(default)
#include <bits/c++config.h>
+ #include <exception_defines.h>
#if !defined(_GLIBCXX_ATOMIC_BUILTINS_4)
# error This platform does not support exception propagation.
*************** namespace std
*** 152,162 ****
template <class _Ex>
exception_ptr copy_exception(_Ex __ex) throw()
{
! try
{
throw __ex;
}
! catch(...)
{
return current_exception ();
}
--- 153,163 ----
template <class _Ex>
exception_ptr copy_exception(_Ex __ex) throw()
{
! __try
{
throw __ex;
}
! __catch(...)
{
return current_exception ();
}
Index: libsupc++/eh_personality.cc
===================================================================
*** libsupc++/eh_personality.cc (revision 143902)
--- libsupc++/eh_personality.cc (working copy)
***************
*** 1,5 ****
// -*- C++ -*- The GNU C++ exception personality routine.
! // Copyright (C) 2001, 2002, 2003, 2006, 2008 Free Software Foundation, Inc.
//
// This file is part of GCC.
//
--- 1,6 ----
// -*- C++ -*- The GNU C++ exception personality routine.
! // Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
! // Free Software Foundation, Inc.
//
// This file is part of GCC.
//
*************** PERSONALITY_FUNCTION (int version,
*** 664,672 ****
std::terminate ();
else if (handler_switch_value < 0)
{
! try
{ std::unexpected (); }
! catch(...)
{ std::terminate (); }
}
}
--- 665,673 ----
std::terminate ();
else if (handler_switch_value < 0)
{
! __try
{ std::unexpected (); }
! __catch(...)
{ std::terminate (); }
}
}
*************** __cxa_call_unexpected (void *exc_obj_in)
*** 753,761 ****
xh_terminate_handler = xh->terminateHandler;
info.ttype_base = (_Unwind_Ptr) xh->catchTemp;
! try
{ __unexpected (xh->unexpectedHandler); }
! catch(...)
{
// Get the exception thrown from unexpected.
--- 754,762 ----
xh_terminate_handler = xh->terminateHandler;
info.ttype_base = (_Unwind_Ptr) xh->catchTemp;
! __try
{ __unexpected (xh->unexpectedHandler); }
! __catch(...)
{
// Get the exception thrown from unexpected.
Index: libsupc++/eh_call.cc
===================================================================
*** libsupc++/eh_call.cc (revision 143902)
--- libsupc++/eh_call.cc (working copy)
***************
*** 1,5 ****
// -*- C++ -*- Helpers for calling unextected and terminate
! // Copyright (C) 2001, 2002, 2003, 2008 Free Software Foundation, Inc.
//
// This file is part of GCC.
//
--- 1,6 ----
// -*- C++ -*- Helpers for calling unextected and terminate
! // Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
! // Free Software Foundation, Inc.
//
// This file is part of GCC.
//
*************** __cxa_call_unexpected(void* exc_obj_in)
*** 108,121 ****
} end_catch_protect_obj;
! try
{
if (foreign_exception)
std::unexpected();
else
__unexpected(unexpectedHandler);
}
! catch(...)
{
/* See if the new exception matches the rtti list. */
if (foreign_exception)
--- 109,122 ----
} end_catch_protect_obj;
! __try
{
if (foreign_exception)
std::unexpected();
else
__unexpected(unexpectedHandler);
}
! __catch(...)
{
/* See if the new exception matches the rtti list. */
if (foreign_exception)
Index: config/locale/gnu/monetary_members.cc
===================================================================
*** config/locale/gnu/monetary_members.cc (revision 143902)
--- config/locale/gnu/monetary_members.cc (working copy)
***************
*** 1,6 ****
// std::moneypunct implementation details, GNU version -*- C++ -*-
! // Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
--- 1,6 ----
// std::moneypunct implementation details, GNU version -*- C++ -*-
! // 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
*************** _GLIBCXX_BEGIN_NAMESPACE(std)
*** 479,485 ****
wchar_t* __wcs_ps = 0;
wchar_t* __wcs_ns = 0;
const char __nposn = *(__nl_langinfo_l(__INT_N_SIGN_POSN, __cloc));
! try
{
mbstate_t __state;
size_t __len = strlen(__cpossign);
--- 479,485 ----
wchar_t* __wcs_ps = 0;
wchar_t* __wcs_ns = 0;
const char __nposn = *(__nl_langinfo_l(__INT_N_SIGN_POSN, __cloc));
! __try
{
mbstate_t __state;
size_t __len = strlen(__cpossign);
*************** _GLIBCXX_BEGIN_NAMESPACE(std)
*** 524,530 ****
_M_data->_M_curr_symbol = L"";
_M_data->_M_curr_symbol_size = wcslen(_M_data->_M_curr_symbol);
}
! catch(...)
{
delete _M_data;
_M_data = 0;
--- 524,530 ----
_M_data->_M_curr_symbol = L"";
_M_data->_M_curr_symbol_size = wcslen(_M_data->_M_curr_symbol);
}
! __catch(...)
{
delete _M_data;
_M_data = 0;
*************** _GLIBCXX_BEGIN_NAMESPACE(std)
*** 647,653 ****
wchar_t* __wcs_ps = 0;
wchar_t* __wcs_ns = 0;
const char __nposn = *(__nl_langinfo_l(__N_SIGN_POSN, __cloc));
! try
{
mbstate_t __state;
size_t __len;
--- 647,653 ----
wchar_t* __wcs_ps = 0;
wchar_t* __wcs_ns = 0;
const char __nposn = *(__nl_langinfo_l(__N_SIGN_POSN, __cloc));
! __try
{
mbstate_t __state;
size_t __len;
*************** _GLIBCXX_BEGIN_NAMESPACE(std)
*** 693,699 ****
_M_data->_M_curr_symbol = L"";
_M_data->_M_curr_symbol_size = wcslen(_M_data->_M_curr_symbol);
}
! catch(...)
{
delete _M_data;
_M_data = 0;
--- 693,699 ----
_M_data->_M_curr_symbol = L"";
_M_data->_M_curr_symbol_size = wcslen(_M_data->_M_curr_symbol);
}
! __catch(...)
{
delete _M_data;
_M_data = 0;
Index: config/locale/gnu/time_members.h
===================================================================
*** config/locale/gnu/time_members.h (revision 143902)
--- config/locale/gnu/time_members.h (working copy)
***************
*** 1,6 ****
// std::time_get, std::time_put implementation, GNU version -*- C++ -*-
! // Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007
// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
--- 1,6 ----
// std::time_get, std::time_put implementation, GNU version -*- C++ -*-
! // 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
*************** _GLIBCXX_BEGIN_NAMESPACE(std)
*** 70,78 ****
else
_M_name_timepunct = _S_get_c_name();
! try
{ _M_initialize_timepunct(__cloc); }
! catch(...)
{
if (_M_name_timepunct != _S_get_c_name())
delete [] _M_name_timepunct;
--- 70,78 ----
else
_M_name_timepunct = _S_get_c_name();
! __try
{ _M_initialize_timepunct(__cloc); }
! __catch(...)
{
if (_M_name_timepunct != _S_get_c_name())
delete [] _M_name_timepunct;
Index: config/locale/generic/time_members.h
===================================================================
*** config/locale/generic/time_members.h (revision 143902)
--- config/locale/generic/time_members.h (working copy)
***************
*** 1,6 ****
// std::time_get, std::time_put implementation, generic version -*- C++ -*-
! // Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007
// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
--- 1,6 ----
// std::time_get, std::time_put implementation, generic version -*- C++ -*-
! // 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
*************** _GLIBCXX_BEGIN_NAMESPACE(std)
*** 73,81 ****
else
_M_name_timepunct = _S_get_c_name();
! try
{ _M_initialize_timepunct(__cloc); }
! catch(...)
{
if (_M_name_timepunct != _S_get_c_name())
delete [] _M_name_timepunct;
--- 73,81 ----
else
_M_name_timepunct = _S_get_c_name();
! __try
{ _M_initialize_timepunct(__cloc); }
! __catch(...)
{
if (_M_name_timepunct != _S_get_c_name())
delete [] _M_name_timepunct;