This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[v3] Fix libstdc++/13976
- From: Paolo Carlini <pcarlini at suse dot de>
- To: "'gcc-patches at gcc dot gnu dot org'" <gcc-patches at gcc dot gnu dot org>
- Cc: Benjamin Kosnik <bkoz at redhat dot com>
- Date: Mon, 02 Feb 2004 13:46:03 +0100
- Subject: [v3] Fix libstdc++/13976
Hi,
this trivial patch fixes the PR. Tested x86-linux.
Seems suited also for the branch and I will apply it there too
in a few days, barring objections.
Paolo.
//////////////
2004-02-02 Paolo Carlini <pcarlini@suse.de>
PR libstdc++/13976
* include/ext/malloc_allocator.h (malloc_allocator::allocate):
Make the second parameter unnamed, to void unused parameter
warnings.
* include/ext/mt_allocator.h (__mt_alloc::allocate): Ditto.
* include/ext/new_allocator.h (new_allocator::allocate): Ditto.
diff -urN libstdc++-v3-orig/include/ext/malloc_allocator.h libstdc++-v3/include/ext/malloc_allocator.h
--- libstdc++-v3-orig/include/ext/malloc_allocator.h 2004-01-29 01:18:39.000000000 +0100
+++ libstdc++-v3/include/ext/malloc_allocator.h 2004-02-02 13:06:30.000000000 +0100
@@ -77,7 +77,7 @@
// NB: __n is permitted to be 0. The C++ standard says nothing
// about what the return value is when __n == 0.
pointer
- allocate(size_type __n, const void* __h = 0)
+ allocate(size_type __n, const void* = 0)
{ return static_cast<_Tp*>(malloc(__n * sizeof(_Tp))); }
// __p is not permitted to be a null pointer.
diff -urN libstdc++-v3-orig/include/ext/mt_allocator.h libstdc++-v3/include/ext/mt_allocator.h
--- libstdc++-v3-orig/include/ext/mt_allocator.h 2004-01-31 18:38:45.000000000 +0100
+++ libstdc++-v3/include/ext/mt_allocator.h 2004-02-02 13:06:05.000000000 +0100
@@ -228,7 +228,7 @@
public:
pointer
- allocate(size_t __n, const void* __h = 0)
+ allocate(size_t __n, const void* = 0)
{
/*
* Although the test in __gthread_once() would suffice, we
diff -urN libstdc++-v3-orig/include/ext/new_allocator.h libstdc++-v3/include/ext/new_allocator.h
--- libstdc++-v3-orig/include/ext/new_allocator.h 2004-01-29 01:18:39.000000000 +0100
+++ libstdc++-v3/include/ext/new_allocator.h 2004-02-02 13:05:40.000000000 +0100
@@ -77,7 +77,7 @@
// NB: __n is permitted to be 0. The C++ standard says nothing
// about what the return value is when __n == 0.
pointer
- allocate(size_type __n, const void* __h = 0)
+ allocate(size_type __n, const void* = 0)
{ return static_cast<_Tp*>(::operator new(__n * sizeof(_Tp))); }
// __p is not permitted to be a null pointer.