This is the mail archive of the gcc@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]

Question w.r.t. `'class Foo' has virtual functions but non-virtualdestructor` warning.


Hello,

I would like to ask if the behaviour of GCC 4.0.0 20050301 is correct or
not. I have for example abstract base class like:

class Foo
{
public:
    virtual unsigned short
    iiop_version() const = 0;
};

and when I compile it, GCC emits warning from subject, although this class
is really abstract and will never be instantiated. It's quite easy to add
virtual dtor there, but I'm reluctant to do so, since IMHO GCC should
check if the class is abstract or not, so I would like to ask if I should
fill a bugreport or correct my code.

Thanks,
Karel
--
Karel Gardas                  kgardas@objectsecurity.com
ObjectSecurity Ltd.           http://www.objectsecurity.com


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