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]



  In message <19980605091533.A20801@keksy.mchp.siemens.de>you write:
  > 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'
Note that while calloc may be ANSI and available on systems as
far back as the pdp11 era, it may not be available on embedded targets.

I'd kind of prefer to avoid adding to the list of routines that must
somehow be made available in cross compilation environments due to
uses in libgcc. 



jeff


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