This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Why does debugging "pure virtual method called" have to be sohard?
- To: Joe Buck <jbuck at synopsys dot com>
- Subject: Re: Why does debugging "pure virtual method called" have to be sohard?
- From: rich_paul at bigfoot dot com
- Date: Wed, 28 Oct 1998 18:02:45 -0500 (EST)
- cc: Mark Mitchell <mark at markmitchell dot com>, oliva at dcc dot unicamp dot br, jason at cygnus dot com, mrs at wrs dot com, egcs at cygnus dot com
- Reply-To: rich_paul at bigfoot dot com
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.