This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [v3] Fix libstdc++/13976
- From: Paolo Carlini <pcarlini at suse dot de>
- To: Paolo Carlini <pcarlini at suse dot de>
- Cc: "'gcc-patches at gcc dot gnu dot org'" <gcc-patches at gcc dot gnu dot org>,Benjamin Kosnik <bkoz at redhat dot com>
- Date: Mon, 02 Feb 2004 14:03:46 +0100
- Subject: Re: [v3] Fix libstdc++/13976
- References: <401E468B.5000508@suse.de>
Paolo Carlini wrote:
Hi,
this trivial patch fixes the PR. Tested x86-linux.
Actually, the below is also needed (the corresponding warning was
masked by that reported), committing to mainline.
Paolo.
///////////////
2004-02-02 Paolo Carlini <pcarlini@suse.de>
PR libstdc++/13976 (continued)
* include/ext/malloc_allocator.h (malloc_allocator::deallocate):
Make the second parameter unnamed, to void unused parameter
warnings.
* include/ext/new_allocator.h (new_allocator::deallocate): 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-02-02 13:06:30.000000000 +0100
+++ libstdc++-v3/include/ext/malloc_allocator.h 2004-02-02 13:55:42.000000000 +0100
@@ -82,7 +82,7 @@
// __p is not permitted to be a null pointer.
void
- deallocate(pointer __p, size_type __n)
+ deallocate(pointer __p, size_type)
{ free(static_cast<void*>(__p)); }
size_type
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-02-02 13:05:40.000000000 +0100
+++ libstdc++-v3/include/ext/new_allocator.h 2004-02-02 13:56:04.000000000 +0100
@@ -82,7 +82,7 @@
// __p is not permitted to be a null pointer.
void
- deallocate(pointer __p, size_type __n)
+ deallocate(pointer __p, size_type)
{ ::operator delete(__p); }
size_type