[top-level] C++-friendly allocators for libiberty

Alexandre Oliva aoliva@redhat.com
Sat Jun 26 03:45:00 GMT 2004


On Jun 25, 2004, Bernardo Innocenti <bernie@develer.com> wrote:

> +#define xcnewvec(T, N)		(T *) xcalloc (N, sizeof (T))
> +#define xresize(T, P, S)	(T *) xrealloc (P, S)
> +#define xresizevec(T, P, N)	(T *) xrealloc (P, sizeof (T) * (N))
> +#define xobnew(O, T)		(T *) obstack_alloc (O, sizeof (T))

You're missing parentheses around N, P (twice), S and O.

-- 
Alexandre Oliva             http://www.ic.unicamp.br/~oliva/
Red Hat Compiler Engineer   aoliva@{redhat.com, gcc.gnu.org}
Free Software Evangelist  oliva@{lsd.ic.unicamp.br, gnu.org}



More information about the Binutils mailing list