[Bug middle-end/92210] no warning for invariable used in loop condition (i.e. add clang's -Wfor-loop-analysis)

dcb314 at hotmail dot com gcc-bugzilla@gcc.gnu.org
Sat Aug 29 12:56:35 GMT 2020


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92210

David Binderman <dcb314 at hotmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |dcb314 at hotmail dot com

--- Comment #4 from David Binderman <dcb314 at hotmail dot com> ---
Not only does clang detect that the control variable isn't changed,
it also detects when the control variable is changed too much.

Code like this gets warned:

for (int i = 0; i < 10; ++i)
{


More information about the Gcc-bugs mailing list