realloc

Dave Jones djones at megatest.UUCP
Fri Mar 31 09:14:01 AEST 1989


>From article <681 at sdrc.UUCP>, by scjones at sdrc.UUCP (Larry Jones):
> 
> And when handed a non-NULL pointer and a zero size, it acts like
> free.  This behavior is required by the draft ANSI Standard.
> 


Gack.

The realloc((char*)0, size) thing was bad enough. What's this all
about?

Stuff like this just makes it hard to port ANSII programs to
old systems. Also makes it harder to convert an old system to ANSII.
I can't think of any good reason to add such a silly spec. What am I
missing?

Can anyone suggest a legitimate reason why they would want to do such
a thing?



More information about the Comp.std.c mailing list