This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Patch to projects.html: glibc's string function macros
- To: rth at cygnus dot com
- Subject: Re: Patch to projects.html: glibc's string function macros
- From: "Kaveh R. Ghazi" <ghazi at caip dot rutgers dot edu>
- Date: Tue, 31 Oct 2000 17:14:30 -0500 (EST)
- Cc: gcc-patches at gcc dot gnu dot org, jsm28 at cam dot ac dot uk, mark at codesourcery dot com
> From: Richard Henderson <rth@cygnus.com>
>
> On Mon, Oct 30, 2000 at 06:49:43PM -0500, Kaveh R. Ghazi wrote:
> > One note, when expanding strstr(s1, "c") -> strchr(s1, c), I didn't
> > hardcode strchr but instead I switched on TARGET_MEM_FUNCTIONS and
> > issued `index' for the BSD case. (I did this by changing the
> > `library_name' when calling builtin_function to register strchr.)
>
> I don't think you should do this. Pedanticly, "strchr" is in
> the standard library namespace and "index" isn't.
> r~
Yes, but that same rationale would apply to memcpy/memset vs
bcopy/bzero. And yet, someone saw the need to switch on
TARGET_MEM_FUNCTIONS.
I don't feel strongly about it, so I'll checkin as you suggest without
`index' later tonight, unless you change your mind. :-)
--Kaveh
PS: any thoughts on creating proper testsuite entries?
I.e. scan-assembler-not vs overriding the libc copy with an abort
wrapper? http://gcc.gnu.org/ml/gcc-patches/2000-10/msg01095.html
Thanks.
--
Kaveh R. Ghazi Engagement Manager / Project Services
ghazi@caip.rutgers.edu Qwest Internet Solutions