------- Comment #4 from pinskia at gcc dot gnu dot org 2010-01-19 03:01 ------- (In reply to comment #3) > So setting a variable as the coder desires is no effect? Some would disagree. > > A statement that really would not have an effect would be: > > if (theworldis > notenough);
No that is not is being warned about. The statement that is being warned about is just "i;" which is the same inside a for statement as it is outside one. Both are statements have no effect as it does nothing. Take: void f(int i) { i; } Do you think that should be warned about? That is the exact same thing which is being warned about when you have: void f(int i) { for(i; .... ; ....) .... } -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42795