What a blatant example of toxic UB exploitation by optimizing compilers. Compilers that take advantage of UB this way should output a proper diagnostic:
potential undefined behavior interpreted as intended
, just like some expressions involving operators with error prone precedence levels are flagged as potential programmers errors. —
chqrlie 5 secs ago