realloc

Guy Harris guy at auspex.auspex.com
Sat Apr 1 17:40:16 AEST 1989


>Unfortunately I can no longer discover which system's
>documentation I actually read about it in.  It was probably 4.1x
>or 4.2bsd (for x in [abc]).

It sure ain't 4.3-tahoe, so I tend to doubt it was 4.1x or 4.2, either.
Maybe some local person had discovered the behavior by e.g. scanning the
source, and updated your documentation?

>Apparently the secret was even better-kept than I realized, since so
>many examples have been listed of systems which neither provide nor
>document the extended behavior.

If, say, the folks at AT&T had never even *seen* the BSD code, it's not
hard to imagine why this was a secret to them, since the BSD
documentation probably didn't mention it.  Even if some implementer
*had* seen it, given that it's an undocumented feature I don't have any
particular problem with them saying "so what" and not implementing it in
their systems - especially since people writing programs would be
ill-advised to depend on a feature not generally documented. 

Now that it's in the dpANS, and will probably be in the ANS, it's
effectively a documented feature, at least to the extent that
implementers should start thinking of providing it.  That's one
advantage of standards: they make it clearer what you can depend on and
can't depend on in a particular environment (or, at least, what things
vendors have no reason not to provide, and what things there's no *de
jure* reason for them to provide - there are, of course, few ironclad
guarantees that some C implementation actually meets the spec, short of
a report saying it passes some test suite, and even then the test suite
could miss something).



More information about the Comp.lang.c mailing list