News for hackers. Stuff that matters.
Re:Undefined behavior in C is a reading error by bregma on Friday May 21, 2021 @07:44AM (#27232797)
Compilers don't "detect undefined behaviour": they assume no undefined behaviour is present. It is not possible to change the semantics of the program that contains undefined behaviour because undefined behaviour means there are no valid semantics to begin with.

This is exactly the same situation as dividing by zero in mathematics. If your proof relies on division by zero, you can always prove anything true (the classic 1 == 0 proof for example).

There are no comments on this comment yet.