This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] C undefined behavior fix


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]