This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] C undefined behavior fix
- From: Florian Weimer <fw at deneb dot enyo dot de>
- To: Linus Torvalds <torvalds at transmeta 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: Sat, 05 Jan 2002 00:31:15 +0100
- Subject: Re: [PATCH] C undefined behavior fix
- References: <Pine.LNX.4.33.0201041416560.8279-100000@penguin.transmeta.com>
Linus Torvalds <torvalds@transmeta.com> writes:
> To paraphrase:
> Two implementation-defines does not make a undefine.
I don't think you can assume that an implementation-defined pointer
value can be safely dereferenced, without triggering undefined
behavior.
> Yes, gcc forgets about "what is a pointer" when it gets to the RTL layer.
> Yes, that means that alias analysis at that level simply is not valid. But
> no, that does not mean that you can avoid the standard.
Why can't we simply break the standard? Other people do it all the
time.