[PATCH] C undefined behavior fix
Richard Henderson
rth@redhat.com
Fri Jan 4 15:53:00 GMT 2002
On Fri, Jan 04, 2002 at 03:30:39PM -0800, Linus Torvalds wrote:
> Ie an implementation can NOT just say "our implementation-defined
> behaviour for X is undefined behaviour". That's not documenting anything.
Why not? It documents that You Can't Do That.
> I realize that gcc internally doesn't know about the distinction after a
> certain point, but if gcc doesn't know, then gcc has to assume the worst.
You will _not_ like the code you'll get out of gcc if we turn off
looking through PLUS. Which I don't even know how to do -- that
sort of thing is scattered all over the compiler.
I will at this point give up on this disagreement. On a practical
level, even if I were to concede your point (which I don't) there
is absolutely nothing that can be done without starting over from
scratch with another compiler.
r~
More information about the Gcc
mailing list