From b0e94ec920230c1bdeaf395e9f4e7ec634e1ef29 Mon Sep 17 00:00:00 2001 From: Paolo Carlini Date: Tue, 22 May 2007 22:43:22 +0000 Subject: [PATCH] testsuite_allocator.h (check_new): Assign false to new_called. 2007-05-22 Paolo Carlini * testsuite/util/testsuite_allocator.h (check_new): Assign false to new_called. (check_delete): Likewise for delete_called. From-SVN: r124966 --- libstdc++-v3/ChangeLog | 6 ++++++ libstdc++-v3/testsuite/util/testsuite_allocator.h | 9 ++++++--- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 2c2ff95d28f..0c66fea67a2 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,9 @@ +2007-05-22 Paolo Carlini + + * testsuite/util/testsuite_allocator.h (check_new): Assign false + to new_called. + (check_delete): Likewise for delete_called. + 2007-05-21 Paolo Carlini * config/locale/gnu/c_locale.h: Do not include , use builtins. diff --git a/libstdc++-v3/testsuite/util/testsuite_allocator.h b/libstdc++-v3/testsuite/util/testsuite_allocator.h index 51e4cf350e9..aaed7311f68 100644 --- a/libstdc++-v3/testsuite/util/testsuite_allocator.h +++ b/libstdc++-v3/testsuite/util/testsuite_allocator.h @@ -1,7 +1,8 @@ // -*- C++ -*- // Testing allocator for the C++ library testsuite. // -// Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +// Copyright (C) 2002, 2003, 2004, 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 @@ -41,8 +42,8 @@ namespace { - bool new_called = false; - bool delete_called = false; + bool new_called; + bool delete_called; }; namespace __gnu_test @@ -188,6 +189,7 @@ namespace __gnu_test check_new(Alloc a = Alloc()) { bool test __attribute__((unused)) = true; + new_called = false; a.allocate(10); test &= ( new_called == uses_global_new ); return test; @@ -198,6 +200,7 @@ namespace __gnu_test check_delete(Alloc a = Alloc()) { bool test __attribute__((unused)) = true; + delete_called = false; typename Alloc::pointer p = a.allocate(10); a.deallocate(p, 10); test &= ( delete_called == uses_global_delete ); -- 2.30.2