This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Why does debugging "pure virtual method called" have to be sohard?


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.



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]