Posted on , in Programming, tagged with recommended reading, c, rust
Pointers are Complicated
This article explains why compilers need the concept of Undefined Behavior to allow optimizations
https://www.ralfj.de/blog/2018/07/24/pointers-and-bytes.html
Key Takeaway:
-
Just because two pointers point to the same address, does not mean they are equal and can be used interchangeably.