[omniORB] RH 7.0 beta, gcc pinstripe warning
David Riddoch
djr@uk.research.att.com
Fri, 1 Sep 2000 09:32:20 +0100 (BST)
Hi,
This is a bogus warning. It is perfectly legal to have a non-virtual
destructor, and safe to do so provided you always apply the delete
operator to a pointer to the most-derived type of the object.
This _is_ the case in omniORB, and so that warning is just plain _wrong_.
Cheers,
David
On Fri, 1 Sep 2000, Gilles J. Seguin wrote:
> Hi,
>
>
> /usr/bin/g++ -c -O2 -Wall -Wno-unused -D_REENTRANT -I. -I./..
> -I./../.. -DUSE_omniORB_logStream -D_OMNIORB_LIBRARY -DUnixArchitecture
> -DCONFIG_DEFAULT_LOCATION='"/etc/omniORB.cfg"' -I.
> -I../../../../include -D__x86__ -D__linux__ -D__OSVERSION__=2 -o
> taskqueue.o taskqueue.cc
> /usr/bin/g++ -c -O2 -Wall -Wno-unused -D_REENTRANT -I. -I./..
> -I./../.. -DUSE_omniORB_logStream -D_OMNIORB_LIBRARY -DUnixArchitecture
> -DCONFIG_DEFAULT_LOCATION='"/etc/omniORB.cfg"' -I.
> -I../../../../include -D__x86__ -D__linux__ -D__OSVERSION__=2 -o
> omniServant.o omniServant.cc
> In file included from localIdentity.h:49,
> from omniServant.cc:58:
> ../omniIdentity.h:98: warning: `class omniIdentity' has virtual
> functions but non-virtual destructor
> In file included from omniServant.cc:58:
> localIdentity.h:243: warning: `class omniLocalIdentity' has virtual
> functions but non-virtual destructor
>
> The Message is repeated for files that include localIdentity.h
> destructor are inline, we need virtual.
>
>
------------------------
djr@uk.research.att.com at work, david@riddoch.org.uk otherwise