Email or username:

Password:

Forgot your password?
3 comments
Louis Dureuil

@thor
Yep, Undefined Behaviour is unreliable. The compiler was written to produce a binary whose behaviour is as described under certain rules, and this program does not respect these rules. It is like using an item in anti-gravity. If it hasn't been specifically designed for this use case, chances are that it assumed gravity. If you're lucky it might work even in anti gravity but you wouldn't count on it. Now the question is if the rules of C++ make sense 🫣
@mdiluz

Marc

@thor yeah, it's mostly because of a specific rule in clang's optimiser

Go Up