This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils 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]

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


Alexandre Oliva <aoliva@redhat.com> writes:

>> +#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.

They're not actually necessary in this context.

zw


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