This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[v3] Small tweak to testsuite_allocator.h


Hi,

tested x86-linux, committed to mainline.

Paolo.

//////////////
2007-05-22  Paolo Carlini  <pcarlini@suse.de>

	* testsuite/util/testsuite_allocator.h (check_new): Assign false
	to new_called.
	(check_delete): Likewise for delete_called.
Index: testsuite/util/testsuite_allocator.h
===================================================================
--- testsuite/util/testsuite_allocator.h	(revision 124906)
+++ testsuite/util/testsuite_allocator.h	(working copy)
@@ -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 @@
     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 @@
     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 );

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]