This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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.
The definition of BUILT_IN_BZERO in builtins.def specifies
NONANSI_P as true, which is passed to builtin_function_2 in
c-common.c, which contains a !(nonansi_p && flag_nonansi_builtin)
test.  So the predefined DECL is never created nor inserted into
the symbol table, so the code you quote in builtins.c is never
called.

And you can call me a dutchman if it isn't so :>

Admittedly, the comment in the source code about only converting
it to a memset if its expanded inline might be wildly inaccurate...

Roger
--


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]