missing warning

Alexander V. Lukyanov lav@long.yar.ru
Wed Nov 25 16:06:00 GMT 1998


On Wed, Nov 25, 1998 at 10:19:11PM +0100, Martin von Loewis wrote:
> > Ok, summary: the code has defined behaviour, and each mentioned potential
> > point of error has legal cases of usage. So a warning could be wrong
> > in any of the cases, thus better to have no warning.
> 
> Almost true: The code does not have defined behaviour (contrary to my
> earlier claims). Deleting an object whose static type has a
> non-virtual destructor and whose dynamic type differs from the static
> type has undefined behaviour.

Hm, right. But this can only be known at runtime with rtti, I think.

   Alexander.



More information about the Gcc-bugs mailing list