[PATCH] C undefined behavior fix

Linus Torvalds torvalds@transmeta.com
Mon Jan 7 08:41:00 GMT 2002


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



More information about the Gcc mailing list