Click on image to see enlargment
Our cook decided to automate Thanksgiving dinner by running this little program to take into account the eccentricities of our guests. But something is going quite wrong. What is it?
bug809.cpp lint Output
--- Module: bug809.cpp _ return p; bug809.cpp(13) : Info 809: Possible return of address of auto through variable 'p'
Reference Manual Explanation
809 Possible return of address of auto through variable 'Symbol' -- The value held by a pointer variable may have been the address of an auto variable. It is normally incorrect to return the address of an item on the stack because the portion of the stack allocated to the returning function is subject to being obliterated after return.
If you have comments or questions about this bug, please post them to our Discussion Forum
Previous Bug - Bug #806 - October 2004