[PATCH] don't bzero->memset if cfun is memset

DJ Delorie dj@redhat.com
Thu Jul 11 21:27:00 GMT 2002


> On Thu, 11 Jul 2002, DJ Delorie wrote:
> > > Indeed, converting "bzero" into memset in a GCC extension.
> >
> > Not so, according to this comment in builtins.c:
> 
> Is too!  This code is never reached when "-ansi" is specified.

What I meant was, it looks like gcc never intended to convert bzero
into memset *at all*, regardless of the -ansi switch.  The tortuous
route the code has to take to make the conversion, the comment that
indicates that gcc makes an effort to ensure that the bzero() is
either inlined or emitted as a call *to bzero*, and the lack of
documentation about the conversion, makes me think that the
bzero->memset conversion is, after all, just a bug, not an intentional
extension.



More information about the Gcc-patches mailing list