This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: malloc attributes and realloc
Robert Dewar <dewar@gnat.com> writes:
[...]
| As for comparing old pointers from realloc, I am less convinced
|
| a) it is hard to believe many programs are affected
| b) the value from a semantic point of view of this feature is marginal
I don't agree there. I've seen many discussions about ways to have an
efficient implementation of C++'s std::vector that expands in-place.
The general impression I've got from such discussions is that people
that roll their own home-grown std::vector-like containers (for
various reasons, either because they have those containers before we
got a standard or because they don't trust the implementation from
their favorite library supplier) using malloc+realloc were actually
doing that comparaison (the vulgar form I pointed out in a previous
discussion).
I don't believe "the value from a semantic point of view is marginal"
-- Gaby