[PATCH] C undefined behavior fix

Florian Weimer fw@deneb.enyo.de
Fri Jan 4 15:31:00 GMT 2002


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.



More information about the Gcc mailing list