|
![]() Click on image to see enlargment |
|
PC-lint/FlexeLint Output | Reference Manual Explanation | Home bug1559.cpp
The above is a hollowed out version of a program that is intended to compute an arrangement of stars for the American flag. But there is a serious flaw. Can you spot it? bug1559.cpp lint Output
--- Module: bug1559.cpp
_
catch( char * const &s ) { }
bug1559.cpp 10 Info 1775: catch block does not catch any declared exception
bug1559.cpp 10 Info 715: Symbol 's' (line 10) not referenced
_
}
bug1559.cpp 11 Warning 1559: Uncaught exception 'const char *' may be thrown
in destructor 'Flag::~Flag(void)'
--- Global Wrap-up
Info 714: Symbol 'flag_history(void)' (line 15, file bug1559.cpp) not
referenced
Reference Manual Explanation
1559 Uncaught exception 'Name' may be thrown in destructor 'Symbol' -- The named
exception occurred within a try block and was either not caught by any handler
or was caught but then thrown from the handler. Destructors should normally
not throw exceptions [23, Item 11].
If you have comments or questions about this bug, please post them to our Discussion Forum |
Previous Bug - Bug #719 - June 2005