From 7ce18a45cbe84c1ff8231e78284f76ae809060cf Mon Sep 17 00:00:00 2001 From: Paolo Carlini Date: Thu, 30 Jul 2009 21:02:44 +0000 Subject: [PATCH] re PR libstdc++/40917 (FAIL: ext/array_allocator/check_delete.cc (test for excess errors)) 2009-07-30 Paolo Carlini PR libstdc++/40917 * testsuite/util/replacement_memory_operators.h: Add missing includes, tweak qualifications. 2009-07-30 Paolo Carlini PR libstdc++/40916 * testsuite/23_containers/list/modifiers/swap/1.cc: Fix include order. * testsuite/23_containers/list/modifiers/swap/2.cc: Likewise. * testsuite/23_containers/list/modifiers/swap/2.cc: Likewise. From-SVN: r150272 --- libstdc++-v3/ChangeLog | 13 +++++++++++++ .../23_containers/list/modifiers/swap/1.cc | 2 +- .../23_containers/list/modifiers/swap/2.cc | 2 +- .../23_containers/list/modifiers/swap/3.cc | 2 +- .../testsuite/util/replacement_memory_operators.h | 15 +++++++++------ 5 files changed, 25 insertions(+), 9 deletions(-) diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index dc78dbd9611e..81226a044f75 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,16 @@ +2009-07-30 Paolo Carlini + + PR libstdc++/40917 + * testsuite/util/replacement_memory_operators.h: Add missing includes, + tweak qualifications. + +2009-07-30 Paolo Carlini + + PR libstdc++/40916 + * testsuite/23_containers/list/modifiers/swap/1.cc: Fix include order. + * testsuite/23_containers/list/modifiers/swap/2.cc: Likewise. + * testsuite/23_containers/list/modifiers/swap/2.cc: Likewise. + 2009-07-30 Ralf Wildenhues * acinclude.m4 (GLIBCXX_CONFIGURE): Use m4_rename_force. diff --git a/libstdc++-v3/testsuite/23_containers/list/modifiers/swap/1.cc b/libstdc++-v3/testsuite/23_containers/list/modifiers/swap/1.cc index d9bd9a2194e1..767640ea9968 100644 --- a/libstdc++-v3/testsuite/23_containers/list/modifiers/swap/1.cc +++ b/libstdc++-v3/testsuite/23_containers/list/modifiers/swap/1.cc @@ -15,8 +15,8 @@ // with this library; see the file COPYING3. If not see // . -#include "1.h" #include +#include "1.h" namespace std { diff --git a/libstdc++-v3/testsuite/23_containers/list/modifiers/swap/2.cc b/libstdc++-v3/testsuite/23_containers/list/modifiers/swap/2.cc index 7bd75a39e3c3..d1faf025f2f7 100644 --- a/libstdc++-v3/testsuite/23_containers/list/modifiers/swap/2.cc +++ b/libstdc++-v3/testsuite/23_containers/list/modifiers/swap/2.cc @@ -17,8 +17,8 @@ // with this library; see the file COPYING3. If not see // . -#include "2.h" #include +#include "2.h" int main() { diff --git a/libstdc++-v3/testsuite/23_containers/list/modifiers/swap/3.cc b/libstdc++-v3/testsuite/23_containers/list/modifiers/swap/3.cc index f994e9b4ae13..676466d537a4 100644 --- a/libstdc++-v3/testsuite/23_containers/list/modifiers/swap/3.cc +++ b/libstdc++-v3/testsuite/23_containers/list/modifiers/swap/3.cc @@ -17,8 +17,8 @@ // with this library; see the file COPYING3. If not see // . -#include "3.h" #include +#include "3.h" int main() { diff --git a/libstdc++-v3/testsuite/util/replacement_memory_operators.h b/libstdc++-v3/testsuite/util/replacement_memory_operators.h index 91c8fa3d38ab..c7b19edc457a 100644 --- a/libstdc++-v3/testsuite/util/replacement_memory_operators.h +++ b/libstdc++-v3/testsuite/util/replacement_memory_operators.h @@ -17,6 +17,9 @@ // . #include +#include +#include +#include namespace __gnu_test { @@ -24,7 +27,7 @@ namespace __gnu_test struct counter { - size_t _M_count; + std::size_t _M_count; bool _M_throw; counter() : _M_count(0), _M_throw(true) { } @@ -48,7 +51,7 @@ namespace __gnu_test return g; } - static size_t + static std::size_t count() { return get()._M_count; } static void @@ -85,7 +88,7 @@ namespace __gnu_test void* operator new(std::size_t size) throw(std::bad_alloc) { - printf("operator new is called \n"); + std::printf("operator new is called \n"); void* p = std::malloc(size); if (p == NULL) throw std::bad_alloc(); @@ -95,7 +98,7 @@ void* operator new(std::size_t size) throw(std::bad_alloc) void operator delete(void* p) throw() { - printf("operator delete is called \n"); + std::printf("operator delete is called \n"); if (p != NULL) { std::free(p); @@ -103,8 +106,8 @@ void operator delete(void* p) throw() std::size_t count = __gnu_test::counter::count(); if (count == 0) - printf("All memory released \n"); + std::printf("All memory released \n"); else - printf("%lu allocations to be released \n", count); + std::printf("%lu allocations to be released \n", count); } }