This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH 2/*] Remove pre-gcc 3.4 string inline optimizations.
- From: OndÅej BÃlka <neleai at seznam dot cz>
- To: Joseph Myers <joseph at codesourcery dot com>
- Cc: libc-alpha at sourceware dot org
- Date: Mon, 8 Jun 2015 11:34:28 +0200
- Subject: Re: [PATCH 2/*] Remove pre-gcc 3.4 string inline optimizations.
- Authentication-results: sourceware.org; auth=none
- References: <20150524150715 dot GA31589 at domone> <20150524152706 dot GB31589 at domone> <alpine dot DEB dot 2 dot 10 dot 1505281603560 dot 16930 at digraph dot polyomino dot org dot uk>
On Thu, May 28, 2015 at 04:05:56PM +0000, Joseph Myers wrote:
> On Sun, 24 May 2015, OndÅej BÃlka wrote:
>
> > -/* GCC < 3.0 optimizes memset(s, 0, n) but not bzero(s, n).
> > - The optimization is broken before EGCS 1.1.
> > - GCC 3.0+ has __builtin_bzero as well, but at least till GCC 3.4
> > - if it decides to call the library function, it calls memset
> > - and not bzero. */
> > -# if __GNUC_PREREQ (2, 91)
> > -# define __bzero(s, n) __builtin_memset (s, '\0', n)
> > -# endif
>
> It looks like you're removing a definition that would be used with current
> GCC here.
>
As comment says its unnecessary as gcc 4 converts bzero to memset as
this header tries.