| ▲ | masklinn 2 hours ago | ||||||||||||||||
Most UBs are runtime conditions, and inserting runtime checks would defeat the point of optimizing for them not possibly happening. For the static ones there are often warnings you can set, but you’ll have to go through the list. Or possibly external checkers (e.g. clang-tidy has one for infinite loops but not sure it’s 1:1 with the optimiser on complex cases) | |||||||||||||||||
| ▲ | vbezhenar an hour ago | parent [-] | ||||||||||||||||
It's not about inserting checks. It's about removing code that I wrote from the binary. That should not happen silently. | |||||||||||||||||
| |||||||||||||||||