branches within C++ destructors

2010-02-25 Thread Rohit Gupta
HI all, I have another query related to virtual destructor in gcc. In present gcc version 4.4.3 for class for sample program:- class A { public: A() { } virtual ~A(); }; A::~A() { } int main(int argc, char ** argv

Understanding branches within C++ destructors

2008-10-24 Thread Jeffrey Newman
Hello, Could anyone explain to me why the following C++ class's destructor shows up as having multiple branches? (At least as judged by gcov when compiled with g++ 4.1.2 ). This was run on Red Hat Enterprise Linux 5. struct blah { blah(); virtual ~blah(); }; blah::blah() { } blah::~blah()