News for hackers. Stuff that matters.
Re:Pointers Are Complicated III, or: Pointer-integer casts e... by xscott on Friday April 15, 2022 @12:14PM (#31041927)
> It's not sufficient to say "there's an int2ptr cast, so stop optimization."

Complicated or not, it's necessary that optimizations do not break correct code.

There doesn't seem to be a problem (UB or otherwise) in the first function at the top of the article, but the second one has a clear aliasing problem that violates the promise the `strict` makes. That translation was invalid.

There are no comments on this comment yet.