[gnu.g++] C++ compiler enhancement request

kipp@warp.wpd.sgi.com (Kipp Hickman) (06/07/89)

Say you have the following class:
	class Something ... {
		virtual ~Something();
	};

If you do this:
	Something* s = ...;
	delete s;

then s is deleted with its virtual function, right?

Well, not always.  If you don't include the declaration
for Something, but instead say this:
	class Something;

you get into trouble because the compiler doesn't know to
invoke the virtual destructor (or any destructor for that matter).

A nice compiler tweak would be to generate warning messages
when system operators are applied to forward declared objects.

does 2.0 do this?  does g++ do this?  cfront 1.2.1 doesn't...

comments (email please)?

				kipp hickman
				silicon graphics inc.