branches within C++ destructors (gcov)

Rohit Gupta rohit.guptakec@gmail.com
Thu Feb 18 12:04:00 GMT 2010


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.
>



More information about the Gcc-help mailing list