This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Question w.r.t. `'class Foo' has virtual functions but non-virtualdestructor` warning.
- From: Karel Gardas <kgardas at objectsecurity dot com>
- To: GCC Mailing List <gcc at gcc dot gnu dot org>
- Date: Fri, 4 Mar 2005 15:51:42 +0100 (CET)
- Subject: 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