summaryrefslogtreecommitdiffstats
path: root/libstdc++-v3/include
diff options
context:
space:
mode:
authorpaolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4>2007-05-02 18:37:00 +0000
committerpaolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4>2007-05-02 18:37:00 +0000
commit43bd286f942a79975a566d675d6283e14f16842f (patch)
tree2f5179f8d6109a50d4b421d6bfacc610e31ebf06 /libstdc++-v3/include
parent40ab1934ac037bdd0ab616acb3228d711268d58f (diff)
downloadppe42-gcc-43bd286f942a79975a566d675d6283e14f16842f.tar.gz
ppe42-gcc-43bd286f942a79975a566d675d6283e14f16842f.zip
2007-05-02 Paolo Carlini <pcarlini@suse.de>
PR libstdc++/31777 * include/ext/pool_allocator.h (__pool_alloc<>::allocate, __pool_alloc<>::deallocate): Fix _S_force_new check. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@124355 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++-v3/include')
-rw-r--r--libstdc++-v3/include/ext/pool_allocator.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/libstdc++-v3/include/ext/pool_allocator.h b/libstdc++-v3/include/ext/pool_allocator.h
index e78bf21778c..f9dcc7fc88d 100644
--- a/libstdc++-v3/include/ext/pool_allocator.h
+++ b/libstdc++-v3/include/ext/pool_allocator.h
@@ -1,6 +1,6 @@
// Allocators -*- C++ -*-
-// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006
+// 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
@@ -212,7 +212,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
}
const size_t __bytes = __n * sizeof(_Tp);
- if (__bytes > size_t(_S_max_bytes) || _S_force_new == 1)
+ if (__bytes > size_t(_S_max_bytes) || _S_force_new > 0)
__ret = static_cast<_Tp*>(::operator new(__bytes));
else
{
@@ -241,7 +241,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
if (__builtin_expect(__n != 0 && __p != 0, true))
{
const size_t __bytes = __n * sizeof(_Tp);
- if (__bytes > static_cast<size_t>(_S_max_bytes) || _S_force_new == 1)
+ if (__bytes > static_cast<size_t>(_S_max_bytes) || _S_force_new > 0)
::operator delete(__p);
else
{
OpenPOWER on IntegriCloud