This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[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>


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]