This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH] libiberty: use void * instead of char * for malloc/realloc declarationn
- From: "Seongbae Park (박성배, 朴成培)" <seongbae dot park at gmail dot com>
- To: gcc-patches <gcc-patches at gcc dot gnu dot org>, "Ian Lance Taylor" <ian at airs dot com>, dj at redhat dot com
- Date: Wed, 12 Mar 2008 17:41:19 -0700
- Subject: [PATCH] libiberty: use void * instead of char * for malloc/realloc declarationn
Hi libiberty maintainers,
During profiled bootstrap,
malloc/realloc declarations in cplus-dem.c causes a compilation error
during stagefeedback, due to conflicting declaration.
It's not clear to me why stagefeedback libiberty is configured as not
having stdlib.h
but regardless this patch looks like the correct thing to do.
Tested by doing a profiled bootstrap (with another patch I'm about to submit).
Ok for mainline ?
Seongbae
2008-03-12 Seongbae Park <seongbae.park@gmail.com>
* cplus-dem.c (malloc, realloc): Use void * instead of char *
as return type.
diff -r acf26548a037 libiberty/cplus-dem.c
--- a/libiberty/cplus-dem.c Wed Mar 12 17:13:01 2008 +0000
+++ b/libiberty/cplus-dem.c Wed Mar 12 15:35:06 2008 -0700
@@ -52,8 +52,8 @@ Boston, MA 02110-1301, USA. */
#ifdef HAVE_STDLIB_H
#include <stdlib.h>
#else
-char * malloc ();
-char * realloc ();
+void * malloc ();
+void * realloc ();
#endif
#include <demangle.h>