From: DJ Delorie Date: Fri, 6 Aug 2004 15:38:11 +0000 (+0000) Subject: merge from gcc X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=deaa6723d2a35d46bc95cd4d7b295596893a158c;p=binutils-gdb.git merge from gcc --- diff --git a/include/ChangeLog b/include/ChangeLog index 2c5340051af..39557fa3aa9 100644 --- a/include/ChangeLog +++ b/include/ChangeLog @@ -1,3 +1,8 @@ +2004-08-02 Gabriel Dos Reis + + * libiberty.h (XDELETE, XDELETEVEC, XRESIZEVEC): Remove any + const-qualification before disposal. + 2004-07-24 Bernardo Innocenti * ansidecl.h (ARG_UNUSED): New Macro. diff --git a/include/libiberty.h b/include/libiberty.h index 68eeeae7396..a90b4ddcbe8 100644 --- a/include/libiberty.h +++ b/include/libiberty.h @@ -261,14 +261,14 @@ extern double physmem_available PARAMS ((void)); #define XNEW(T) ((T *) xmalloc (sizeof (T))) #define XCNEW(T) ((T *) xcalloc (1, sizeof (T))) -#define XDELETE(P) free ((P)) +#define XDELETE(P) free ((void*) (P)) /* Array allocators. */ #define XNEWVEC(T, N) ((T *) xmalloc (sizeof (T) * (N))) #define XCNEWVEC(T, N) ((T *) xcalloc ((N), sizeof (T))) -#define XRESIZEVEC(T, P, N) ((T *) xrealloc ((P), sizeof (T) * (N))) -#define XDELETEVEC(P) free ((P)) +#define XRESIZEVEC(T, P, N) ((T *) xrealloc ((void *) (P), sizeof (T) * (N))) +#define XDELETEVEC(P) free ((void*) (P)) /* Allocators for variable-sized structures and raw buffers. */