4 ms·
Point 14 explicitly says UB in dead code. The implicit assumption is no UB in live code, otherwise the UB in dead code is a red herring. So the UB is never re
by leni536 4y ago
Point 14 explicitly says UB in dead code.
The implicit assumption is no UB in live code, otherwise the UB in dead code is a red herring.
So the UB is never reached, by the definition of dead code.
Unreachable UB is fine.
If this wasn't the intended message of point 14, then it's phrased wrong.
- oconnor663 4y agoYeah the format of the article makes this mistake extra confusing. The statement in point 14 is in fact true, but the whole premise is that all these statements are supposed to be false.