Why does debugging "pure virtual method called" have to be sohard?
rich_paul@bigfoot.com
rich_paul@bigfoot.com
Thu Oct 29 00:50:00 GMT 1998
On Tue, 27 Oct 1998, Joe Buck wrote:
> Mark Mitchell points out:
>
> > class C {
> > virtual void f () throw () = 0;
> > };
> >
> > C& c = g();
> > c.f();
>
> and the fact that the optimizer may wish to use the no-throw guarantee.
<<LANGUAGE LAWYER MODE ON>>
It could be argued that since there IS no function to call,
the function is NOT throwing an exception. The function
calling the pure virtual function is throwing the exception.
<<LANGUAGE LAWYER MODE OFF>>
just food for thought. I think this issue is too iffy to be decided
by the compiler, in the absence of a standard. Let's let the user
decide.
BTW, having seen the definition for __pure_virtual, I retract my
statement that I need somebody to show me where it is ( didn't have
the source with me when writing ) and I'll generate a patch for
consideration.
More information about the Gcc
mailing list