Interesting articles about optimizing C/C++ compilers and interactions with undefined behavior.
As compiler writers are focused on improving their optimizers, they are taking advantage of undefined behavior to more aggressively optimize, resulting in some potentially unexpected results even for experienced C/C++ developers. I highly recommend reading the below articles.
This message and any enclosures are intended only for the addressee. Please
notify the sender by email if you are not the intended recipient. If you are
not the intended recipient, you may not use, copy, disclose, or distribute this
message or its contents or enclosures to any other person and any such actions
may be unlawful. Ball reserves the right to monitor and review all messages
and enclosures sent to or from this email address.