News for hackers. Stuff that matters.
Re:Initialization in C++ is Seriously Bonkers by codeflo on Sunday January 06, 2019 @04:00AM (#18837372)
What's actually happening is a bit more subtle: The compiler is allowed to assume that the programmer in fact made no mistake and there's a reason why the UB is never actually triggered at runtime. Reasoning backwards from that can open up large optimization opportunities elsewhere, like not loading a value from memory twice, or not actually checking a condition. A good article about this that was recently discussed on HN: https://news.ycombinator.com/item?id=18575383

There are no comments on this comment yet.