3 ms·
You are 100% right. LLVM should fire a dead code warning here. However later code is used as a jump target for goto so it's quite hard for the compiler to infer
by d0 13y ago
You are 100% right. LLVM should fire a dead code warning here. However later code is used as a jump target for goto so it's quite hard for the compiler to infer this (or is it because its a different scope?).
Either way, definitely avoidable.
Looks typical of a merge cock up to me as the indentation is preserved suggesting it's a duplicate line or there was an if statement on the previous line that was removed.
- jey 13y agoThe basic blocks from just after the unconditional goto up to the "fail:" label are all unreachable, so a dead code warning could be issued. > However later code is used as a jump target for goto so it's quite hard for the compiler to infer this Nope, because a jump target always starts a new basic block.
- fit2rule 13y agoLooks to me like Apple aren't running Code-Coverage tests on their OS. That's kind of very scary.