summaryrefslogtreecommitdiff
path: root/libstdc++-v3/testsuite/ext/mt_allocator/deallocate_local-2.cc
diff options
context:
space:
mode:
authorbkoz <bkoz@138bc75d-0d04-0410-961f-82ee72b054a4>2004-10-12 01:10:39 +0000
committerbkoz <bkoz@138bc75d-0d04-0410-961f-82ee72b054a4>2004-10-12 01:10:39 +0000
commit7b0420368989001a7146b899a51e88bf8ae7a1cb (patch)
tree78c99a88a4a9f7e8634edb1c6c35d4a19485dba1 /libstdc++-v3/testsuite/ext/mt_allocator/deallocate_local-2.cc
parentd834e089470fc1a2acacac9ca7493462089fdac7 (diff)
downloadgcc-7b0420368989001a7146b899a51e88bf8ae7a1cb.tar.gz
2004-10-11 Benjamin Kosnik <bkoz@redhat.com>
* include/bits/stl_deque.h: Correct for over-long lines. 2004-10-11 Benjamin Kosnik <bkoz@redhat.com> PR libstdc++/17937 * include/ext/mt_allocator.h (__pool::_M_destroy): New. * src/mt_allocator.cc (__pool::~__pool): Change definitions to _M_destroy. * acconfig.h: Remove _GLIBCXX_USE___CXA_ATEXIT. * acinclude.m4 (GLIBCXX_ENABLE_CXA_ATEXIT): Remove. * configure.ac: Remove call to GLIBCXX_ENABLE_CXA_EXIT. * configure: Regenerate. * config/linker-map.gnu: Tweak exports. * docs/html/ext/mt_allocator.html: Update docs. * testsuite/ext/mt_allocator/deallocate_global-2.cc: Fix. * testsuite/ext/mt_allocator/deallocate_global-4.cc: Fix. * testsuite/ext/mt_allocator/deallocate_global_thread-1.cc: Fix. * testsuite/ext/mt_allocator/deallocate_global_thread-3.cc: Fix. * testsuite/ext/mt_allocator/deallocate_local-2.cc: Fix. * testsuite/ext/mt_allocator/deallocate_local-4.cc: Fix. * testsuite/ext/mt_allocator/deallocate_local_thread-3.cc: Fix. * testsuite/ext/mt_allocator/deallocate_local_thread-1.cc: Fix. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@88913 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++-v3/testsuite/ext/mt_allocator/deallocate_local-2.cc')
-rw-r--r--libstdc++-v3/testsuite/ext/mt_allocator/deallocate_local-2.cc17
1 files changed, 9 insertions, 8 deletions
diff --git a/libstdc++-v3/testsuite/ext/mt_allocator/deallocate_local-2.cc b/libstdc++-v3/testsuite/ext/mt_allocator/deallocate_local-2.cc
index b8e2784f484..ae1ca528ee0 100644
--- a/libstdc++-v3/testsuite/ext/mt_allocator/deallocate_local-2.cc
+++ b/libstdc++-v3/testsuite/ext/mt_allocator/deallocate_local-2.cc
@@ -31,10 +31,11 @@ struct count_check
count_check() {}
~count_check()
{
-#ifdef _GLIBCXX_USE___CXA_ATEXIT
if (count != 0)
- throw std::runtime_error("count isn't zero");
-#endif
+ {
+ // NB: __mt_allocator doesn't clean itself up. Thus, this will
+ // not be zero.
+ }
}
};
@@ -63,11 +64,11 @@ void operator delete(void* p) throw()
free(p);
}
-typedef char char_t;
-typedef std::char_traits<char_t> traits_t;
-typedef __gnu_cxx::__common_pool_policy<false> pool_t;
-typedef __gnu_cxx::__mt_alloc<char_t, pool_t> allocator_t;
-typedef std::basic_string<char_t, traits_t, allocator_t> string_t;
+typedef char value_t;
+typedef std::char_traits<value_t> traits_t;
+typedef __gnu_cxx::__common_pool_policy<false> policy_t;
+typedef __gnu_cxx::__mt_alloc<value_t, policy_t> allocator_t;
+typedef std::basic_string<value_t, traits_t, allocator_t> string_t;
int main()
{