[PATCH] libiberty: use void * instead of char * for malloc/realloc declarationn
Seongbae Park (박성배, 朴成培)
seongbae.park@gmail.com
Thu Mar 13 00:41:00 GMT 2008
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>
More information about the Gcc-patches
mailing list