This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: egcs-19980531, warning patches [part 1/2]
- To: martin dot kahlert at mchp dot siemens dot de
- Subject: Re: egcs-19980531, warning patches [part 1/2]
- From: Joe Buck <jbuck at synopsys dot com>
- Date: Fri, 5 Jun 98 9:52:19 PDT
- Cc: ghazi at caip dot rutgers dot edu, egcs at cygnus dot com
> 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).