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]


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.


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