warning: iteration 128 invokes undefined behavior [-Waggressive-loop-optimizations] 迭代数组时,超出了定义的数值大小,调整迭代次数解决了。
In some loops that have known constant number of iterations, but undefined behavior is known to occur in the loop before reaching or during the last iteration, GCC will warn about the undefined behavior in the loop instead of deriving lower upper bound of the number of iteration...
[Bug tree-optimization/106842] [12 Regression] misleading warning : iteration X invokes undefined behavior rguenth at gcc dot gnu.org via Gcc-bugs Thu, 20 Jun 2024 02:26:08 -0700 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106842 Richard Biener <rguenth at gcc dot gnu.org> changed:...
warning: iteration 128 invokes undefined behavior [-Waggressive-loop-optimizations] 迭代数组时,超出了定义的数值大小,调整迭代次数解决了。