|
PC-lint/FlexeLint Output | Reference Manual Explanation | Home Page bug681.cpp
Our programmer expected to sum the numbers from 1 to 9 but was disappointed when the value printed was something much less. What went wrong? bug681.cpp lint Output
--- Module: bug681.cpp
_
while( f(n) && n ) sum += n;
bug681.cpp(15) : Warning 681: Loop is not entered
Reference Manual Explanation
681 Loop is not entered -- The controlling expression for a
loop (either the expression within a while clause or the
second expression within a for clause) evaluates initially
to 0 and so it appears as though the loop is never
entered.
|
Previous Bug - Bug #568 - April 2002