public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] libiberty: use void * instead of char * for malloc/realloc declarationn
@ 2008-03-13  0:41 Seongbae Park (박성배, 朴成培)
  2008-03-13  3:43 ` Ian Lance Taylor
  0 siblings, 1 reply; 2+ messages in thread
From: Seongbae Park (박성배, 朴成培) @ 2008-03-13  0:41 UTC (permalink / raw)
  To: gcc-patches, Ian Lance Taylor, dj

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>

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] libiberty: use void * instead of char * for malloc/realloc declarationn
  2008-03-13  0:41 [PATCH] libiberty: use void * instead of char * for malloc/realloc declarationn Seongbae Park (박성배, 朴成培)
@ 2008-03-13  3:43 ` Ian Lance Taylor
  0 siblings, 0 replies; 2+ messages in thread
From: Ian Lance Taylor @ 2008-03-13  3:43 UTC (permalink / raw)
  To: Seongbae Park (박성배, 朴成培)
  Cc: gcc-patches, dj

"Seongbae Park (박성배, 朴成培)" <seongbae.park@gmail.com> writes:

> 2008-03-12  Seongbae Park <seongbae.park@gmail.com>
> 
>         * cplus-dem.c (malloc, realloc): Use void * instead of char *
>         as return type.

This is OK.

Thanks.

Ian

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-03-13  3:43 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-03-13  0:41 [PATCH] libiberty: use void * instead of char * for malloc/realloc declarationn Seongbae Park (박성배, 朴成培)
2008-03-13  3:43 ` Ian Lance Taylor

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).