Yeah, but then you need compiler to somehow know if it's truly unreachable to know when to emit the warning and when to not do that.

If it's a warning and not an error then emit it whether it's unreachable or not