| ▲ | imtringued an hour ago | |
Hot take: The vast majority of UB optimizations in C are just hacks to get around mutable aliasing being the default. Edit: To be fair for the current topic it's more of an "Inverted Design-by-Contract" issue. The compiler infers the contract via UB instead of exposing it to the developer. when you divide a/b the contract b != 0 is formed on the function signature, but never made visible. Then someone inevitably violates the invisible contract and all hell breaks loose. | ||