3 ms·
That's not really viable. Otherwise all compiler vendors would have already implemented a "error-on-all-undefined-behavior" switch. (See other poster.) Compile
by lomnakkus 12y ago
That's not really viable. Otherwise all compiler vendors would have already implemented a "error-on-all-undefined-behavior" switch. (See other poster.)
Compiler vendors are trying to implement sanity checks and such, but there's only so much they can do given that whether something is "undefined behavior" may depend on run-time values.
EDIT: Btw, this is what happens if you ever have a language with "undefined behavior". On the upside it can probably perform (given a correct program) like nobody's business on any given architecture (from x86 to DSPs with 10-bit chars).