egcs-19980531, warning patches [part 1/2]
Joe Buck
jbuck@synopsys.com
Fri Jun 5 09:54:00 GMT 1998
> I think calloc is an ANSI C library routine, which is as protable as
> can be. On my linux-system man bzero sais under Conforming to:
> '4.3BSD. This function is deprecated -- use memset in new programs'
While calloc has been around forever, unfortunately
"ANSI C library routine" != "as portable as can be" ...
older BSDish systems often are missing ANSI functions or
even implement them completely differently (e.g. sprintf).
Since gcc has to boot on such platforms, we have to be careful.
In the case of calloc I don't think there should be any problem
because it goes back to version 7 Unix on the PDP-11 (yes, I'm old).
More information about the Gcc
mailing list