"remove dead code... loop entrance condition is i<backtrack.size(). Therefore,
this branch can never be taken."
False.
While the entrance condition prevents 'i == backtrack.size()', the loop may
exit with 'i == backtrack.size()', since i++ is executed after the last
iteration. Since we do not expect or want this condition to occur, though, I
transform this to a documented ASSERT().
for (i = 0; i < backtrack.size(); i++)
if (backtrack[i] == true)
break;
+ /* Backtrack set was empty? */
+ ASSERT(i != backtrack.size());
+
backtrack[i] = false;
numBacktracks--;
return int_to_id(i);