OSDN Git Service

2011-05-26 Jonathan Wakely <jwakely.gcc@gmail.com>
[pf3gnuchains/gcc-fork.git] / libstdc++-v3 / src / pool_allocator.cc
index ebaa394..f94656b 100644 (file)
@@ -40,7 +40,9 @@ namespace
   }
 } // anonymous namespace
 
-_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
+namespace __gnu_cxx _GLIBCXX_VISIBILITY(default)
+{
+_GLIBCXX_BEGIN_NAMESPACE_VERSION
 
   // Definitions for __pool_alloc_base.
   __pool_alloc_base::_Obj* volatile*
@@ -94,7 +96,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
          {
            _S_start_free = static_cast<char*>(::operator new(__bytes_to_get));
          }
-       __catch (...)
+       __catch(const std::bad_alloc&)
          {
            // Try to make do with what we have.  That can't hurt.  We
            // do not try smaller requests, since that tends to result
@@ -171,4 +173,5 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
   template class __pool_alloc<char>;
   template class __pool_alloc<wchar_t>;
 
-_GLIBCXX_END_NAMESPACE
+_GLIBCXX_END_NAMESPACE_VERSION
+} // namespace