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

2005-03-05 Thread Jonathan Wakely
On Sat, Mar 05, 2005 at 09:00:38AM -0500, Michael N. Moran wrote: > In embedded system work, and I'm sure in other circumstances, > it is the case that "placement new" is the norm and destructors > invoked explicitly (never on an abstract reference,) and the > delete operator goes unused. I shoul

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

2005-03-05 Thread Michael N. Moran
Frank Ch. Eigler wrote: Karel Gardas <[EMAIL PROTECTED]> writes: [...] 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. [...] I guess GCC assu

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

2005-03-04 Thread Florian Weimer
* Jonathan Wakely: > e.g. this is undefined behaviour: > > class Base {}; > class Derived : public Base {}; > > Base* p = new Derived; > delete p; Wouldn't it make more sense to issue the warning at the point of the delete, then?

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

2005-03-04 Thread Karel Gardas
On Fri, 4 Mar 2005, Jonathan Wakely wrote: > On Fri, Mar 04, 2005 at 03:51:42PM +0100, Karel Gardas wrote: > > > 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 unsign

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

2005-03-04 Thread Frank Ch. Eigler
Karel Gardas <[EMAIL PROTECTED]> writes: > [...] > 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. [...] I guess GCC assu

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

2005-03-04 Thread Jonathan Wakely
On Fri, Mar 04, 2005 at 03:51:42PM +0100, Karel Gardas wrote: > 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

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

2005-03-04 Thread Mws
On Friday 04 March 2005 15:51, Karel Gardas wrote: > > 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; > }; hi Karel

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

2005-03-04 Thread Karel Gardas
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