What is the explanation for “warning: assuming that the loop is not infinite”

前端 未结 3 1208
旧巷少年郎
旧巷少年郎 2021-02-19 09:17

I had just taken the decision to change as many variables from unsigned to int and upon recompiling the code in question, was greeted by this warning m

3条回答
  •  醉酒成梦
    2021-02-19 09:41

    I think that GCC is telling you that it can't determine that the loop is not infinite and is carrying on with compilation regardless. It's a warning, not an error, something you may want to think about.

提交回复
热议问题