This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: patch to clean out savestring, copystr, mybzero and mybcopy
- To: Per Bothner <bothner at cygnus dot com>
- Subject: Re: patch to clean out savestring, copystr, mybzero and mybcopy
- From: Jeffrey A Law <law at cygnus dot com>
- Date: Tue, 12 Jan 1999 01:25:32 -0700
- cc: "Kaveh R. Ghazi" <ghazi at caip dot rutgers dot edu>, egcs-patches at cygnus dot com
- Reply-To: law at cygnus dot com
In message <199901120135.RAA14492@cygnus.com>you write:
> > This patch cleans out some uses of savestring, copystr, mybzero
> > and mybcopy, it instead uses xstrdup, or bzero/bcopy. Okay to install?
>
> While one can argue for using bzero vs memset,
> I think bcopy should be replaced by memmove/memcpy, in all code
> that runs on the "host", since we have the appropriate autoconf
> support.
I'm not aware of any special advantage of memset over bzero. The compiler
knows how to suitably optimize both. Systems where the mem* functions are
orders of magnitude slower than the b* functions are probably long gone.
jeff