[GCC-XML] virtual function

Nindi Singh nindi73 at yahoo.co.uk
Sat Feb 2 04:19:21 EST 2008

I have the following code in a file class.h
class Base {
    virtual void func()=0;

class Derived:public Base {
    void func(){}

When I parse it with gccxml  using the command 
            gccxml class.h -fxml=class.xml

I see the following 2 lines in the resulting xml file


  <Method id="_138" name="func" returns="_136" virtual="1" context="_40" access="public" mangled="_ZN7Derived4funcEv" demangled="Derived::func()" location="f1:26" file="f1" line="26" inline="1"/>
  <Method id="_149" name="func" returns="_136" virtual="1" pure_virtual="1" context="_105" access="public" mangled="_ZN4Base4funcEv" demangled="Base::func()" location="f1:21" file="f1" line="21" extern="1"/>


I am curious the method 'func' in class Derived is described as virtual. Its not. If I am missing something, then how can I tell whether a function 'may' be overloaded in a derived class or not.

Support the World Aids Awareness campaign this month with Yahoo! For Good http://uk.promotions.yahoo.com/forgood/

More information about the gccxml mailing list