3 ms·
It's not tricky though. Unreachable invokes UB. It's something like the most canonically reduced version of B that we can write. (Because unreachable is meant
by kazinator 2y ago
It's not tricky though. Unreachable invokes UB. It's something like the most canonically reduced version of B that we can write.
(Because unreachable is meant to be used in certain ways, implementations can give it relevant diagnostic powers. But all it means "please make the spot in the program have no defined behavior").
If the implementation cannot remove A on grounds of B being undefined, then you need an awkward special case for when B is the unreachable gizmo.
- uecker 2y agoIt is tricky because it not specified simply as UB - at least in C. And the question is whether this specification is already the special case or not, and even if we want this special case or rather only the diagnostic.