C++ PATCH: PR 16405
Daniel Jacobowitz
drow@false.org
Thu Dec 23 17:01:00 GMT 2004
On Thu, Dec 23, 2004 at 08:17:35AM -0800, Mark Mitchell wrote:
> >
> >>+ extern "C"
> >>+ void *memcpy (void *dest, const void *src, __SIZE_TYPE__ n)
> >>+ {
> >>+ ++i;
> >>+ }
> >
> >
> >Does the testcase really start up?
>
> I forgot the dg-do run (I'll fix shortly), but I'm not sure that's what
> you mean.
>
> >In some cases you'll wind
> >up invoking this memcpy before we even get to main. See the
> >sort of contortions we go through in gcc.c-torture/execute/builtins/
> >for testing this sort of thing.
>
> That's why I set i to zero in main.
Yes, but your memcpy doesn't copy memory. If the C library startup
uses memcpy, who knows what it might do...
--
Daniel Jacobowitz
More information about the Gcc-patches
mailing list