This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] C undefined behavior fix
- From: Linus Torvalds <torvalds at transmeta dot com>
- To: Alexandre Oliva <aoliva at redhat dot com>
- Cc: Richard Henderson <rth at redhat dot com>, Tom Rini <trini at kernel dot crashing dot org>, <gcc at gcc dot gnu dot org>
- Date: Mon, 7 Jan 2002 08:40:39 -0800 (PST)
- Subject: Re: [PATCH] C undefined behavior fix
On 7 Jan 2002, Alexandre Oliva wrote:
>
> I had got the impression that RELOC would add an offset that was not
> known at compile time, because the built-in strcpy will not be
> optimized to memcpy if the constant offset is outside the bounds of
> the string in the current CVS version of GCC, so there isn't any
> problem in this case.
You're right, that code is even worse than the thing that was posted here
on the list at some point. Absolutely no complaints then (although I still
hope for the int/ptr cast approach).
Linus