This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Patch to allow strlen expander to fail
- To: Horst von Brand <vonbrand at sleipnir dot valparaiso dot cl>
- Subject: Re: Patch to allow strlen expander to fail
- From: Jeffrey A Law <law at cygnus dot com>
- Date: Mon, 06 Mar 2000 12:37:49 -0700
- cc: gcc at gcc dot gnu dot org
- Reply-To: law at cygnus dot com
In message <200003060159.e261xPj06505@sleipnir.valparaiso.cl>you write:
> Jan Hubicka <hubicka@atrey.karlin.mff.cuni.cz> said on gcc-patches:
> > This patch adds the strlen libcall and necesary code to emit_builtin_strl
> en
> > to emit libcall when strlen expander fails.
>
> Is there some documentation about the functions gcc might generate calls
> to?
No, and any such documentation would have the caveat that the conditions
under which GCC will use a libcall can change without warning or
predictability.
Any code which depends on gcc generating or not generating libcalls is
broken.
> There was recently a problem with the Linux kernel because gcc
> willy-nilly called memcpy(3), and that one isn't around in the kernel,
Then that's a kernel problem. They're depending on a specific, undocumented
and highly implementation dependent behavior in the compiler. That's dumb.
jeff