I'd envisage that working like Rust failing to compile when you have a mutable reference inside a loop but working if you clone it or make it immutable except with the additional case that you can just promote it to the catch-all type. If it's a loop over a range of ints, it might be possible to use that range to determine the necessary type.
All that said, if you're using unbounded loops doing arithmetic on signed integers then you're already dealing with UB in C/C++ land.
All that said, if you're using unbounded loops doing arithmetic on signed integers then you're already dealing with UB in C/C++ land.