This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: branches within C++ destructors (gcov)


Hi ,

Can I have some clue(help) from the hierarchy class file dumped by gcc option -fdump-class-hierarchy .In which there are details about Vtable entries for classes.

--
Thanks and Regards,
Rohit Gupta
--

On 02/18/2010 03:52 PM, Rohit Gupta wrote:
Hi ,


I am having problem understanding branches ( number ) generated by gcov report for
c++ program. Might you please clear my doubts.


#include<iostream>

using namespace std;

class A
{
public:
         A()
         {
         }
         virtual void functionABC (int value)
         {
                         cout<<value;
         }
         virtual ~A()
         {
         }
};
class B : public virtual A
{
public:
         B()
         {
         }
         virtual ~B()
         {
         }
};
class C : public B
{
public:
         C()
         {
         }
         virtual ~C()
         {
         }

};

int main(int argc, char ** argv)
{

         A a;
         B b;
         C c;
         return 0;
}

Gcov report for the following is attached.

Any help will be greatly appreciated.



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]