This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] mtrace: properly handle realloc (p, 0)
On Thu, Jan 03, 2013 at 12:24:31AM +0000, Joseph S. Myers wrote:
> On Wed, 2 Jan 2013, Rich Felker wrote:
>
> > POSIX has rewritten the specification of realloc in terms of changing
> > the size of an object, a concept that does not exist in plain C (for
> > very good reason).
>
> No, it's based the specification on C90, where it starts "The realloc
> function changes the size of the object". Both C99 and POSIX then made
Thank you for the clarification. That makes a lot more sense, but I
still think it was a very poor specification to begin with, and
probably has a lot of contradictions with other requirements in the
standard relating to pointers (since it implies that the address of an
object can change).
Rich