This is the mail archive of the
mailing list for the glibc project.
Re: Should we optimize memset to bzero?
- To: jsm28 at cam dot ac dot uk
- Subject: Re: Should we optimize memset to bzero?
- From: "Martin v. Loewis" <martin at v dot loewis dot de>
- Date: Fri, 2 Nov 2001 20:05:28 +0100
- CC: hjl at lucon dot org, jakub at redhat dot com, libc-alpha at sources dot redhat dot com
- References: <Pine.SOL.email@example.com>
> Glibc shouldn't try to second-guess GCC here. Instead, *all* the inline
> optimisations for standard string functions should move into GCC. Glibc
> will then need to communicate to GCC that it has certain functions such as
> __bzero that the built-in functions may reduce to. I've previously
> suggested an implicitly included <stdc-macros.h> header that GCC would
> automatically include (if it exists) before every translation unit in
> order to define __STDC_ISO_10646__ (which describes library properties
> that change with the glibc version, but must be constant throughout the
> translation unit rather than just after some standard header has been
> included) properly.
Wouldn't it be better to determine features of the C library at
gcc configuration time?