The result of running this program printed the expected '0' using one compiler but produced a very large number using another. Why the difference? Hint: this will require a degree of visual acuity.
bug1741.cpp lint Output
--- Module: bug1741.cpp _ } bug1741.cpp(14) : Info 1741: member 'A::len' (line 6) conceivably not initialized by constructor _ } bug1741.cpp(14) : Info 1741: member 'A::a' (line 7) conceivably not initialized by constructor
Reference Manual Explanation
1741 member 'Symbol' (Location) conceivably not initialized by constructor -- The indicated member symbol may not have been initialized by a constructor. Was this an oversight? There appears to be a path through a loop that does initialize the member and the warning is issued because it is not clear that the loop is always executed at least once.
If you have comments or questions about this bug, please post them to our Discussion Forum
Previous Bug - Bug #1540 - March 2003