3 ms·
Yeah a lot of the badness of UB in C and C++ is stupid and has no place in the language. UB should be reserved for cases where there is no definable outcome, an
by olliej 3y ago
Yeah a lot of the badness of UB in C and C++ is stupid and has no place in the language. UB should be reserved for cases where there is no definable outcome, and everything else should be unspecified or implementation defined. Things like overflow, null sereferences, etc should not give the compiler the opportunity to go back in time and remove preceding branches (which is what the current interpretation of UB allows).