This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: egcs-19980531, warning patches [part 1/2]



> 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).




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]