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: "Kaveh R. Ghazi" <ghazi at caip dot rutgers dot edu>
- Subject: Re: egcs-19980531, warning patches [part 1/2]
- From: Martin Kahlert <martin dot kahlert at mchp dot siemens dot de>
- Date: Fri, 5 Jun 1998 09:15:33 +0200
- Cc: egcs at cygnus dot com
- References: <199806040019.UAA09655@caip.rutgers.edu>
- Reply-To: martin dot kahlert at mchp dot siemens dot de
Quoting Kaveh R. Ghazi (ghazi@caip.rutgers.edu):
> Here is another round of warning fixes. This is part 1/2.
>
> Please pay special attention to the libgcc2.c change where I replaced
> malloc/bzero with calloc. The replacement eliminates a warning about
> bzero not being prototyped (and is more optimal on linux??)
>
> I'd like first to know if relying on calloc is considered portable.
> The xcalloc implementations I found in gcc's source don't call calloc,
> instead they manually call malloc/bzero.
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'
Martin.