Pointers Are Complicated III, or: Pointer-integer casts exposed
&gt; [...] restrict, a C keyword to promise that a given pointer x does not alias any other pointer not derived from x<p>The author clearly states that restrict is a promise, and then immediately violates that promise.  If you lie to the compiler, what do you expect to happen?.<p>Declaring your pointers &quot;restrict&quot; is a promise from your code to the compiler, <i>not</i> from the compiler to your code.<p>It seems like the entire rest of the article is based on this misunderstanding, and there are a whole bunch of strong statements and questionable conclusions drawn from it:<p>&gt; This is bad news. Our optimizations changed program behavior. That must not happen!<p>&gt; the only possibly suspicious part of the original program is a pointer-integer-pointer round-trip<p>&gt; while the details of defining “derived from” are nasty, it should be clear that doing a bunch of operations that literally don’t involve x at all cannot by any stretch of the imagination produce a result that is “derived from” x<p>It&#x27;s hard for me to make sense of the rest of the business about &quot;provenance&quot; when the problem it&#x27;s supposed to solve are based on faulty reasoning.  The part about casting to integer having side effects doesn&#x27;t follow either.<p>I&#x27;ve always liked C, and I&#x27;m coming to really like Rust. I hope mistaken arguments like the ones in this article aren&#x27;t persuasive to anyone in the compiler camps.