This is the mail archive of the
mailing list for the GCC project.
Re: [top-level] C++-friendly allocators for libiberty
On Sat, Jun 26, 2004 at 04:39:04AM +0200, Bernardo Innocenti wrote:
> Ian Lance Taylor wrote:
> > Bernardo Innocenti <firstname.lastname@example.org> writes:
> >>On second thought, the interface for xrenew() or xresize() wasn't
> >>even usable without a size argument.
> > Oh yeah.
> >>Maybe this would be better?
> >> #define xrenewvec(P, T, N) (T *) xrealloc ((P), sizeof(T) * (N))
> > No, people use realloc with variable size arrays at the end of
> > structs. xrenewvec (or xresizevec) is a good idea, but you still need
> > xrenew (or xresize).
Bernando, you've now got an interface which allows reallocating to a
variable size, but not allocating to one... There's no need for a
rush, let's give people some time to comment before putting this into
libiberty. As DJ says, it's hard to take things out of libiberty.