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: Recompiling troubles.... Was Re: Strange behaviour in C++...


[calling virtual functions in destructors]
> Hmmm, I am not calling any virtual functions in destructors. I assume
> you meant constructors. 

Yes, either constructors, or destructors.

> Anyway, that is not an option. I use CORBA which means a lot of
> abstract (virtual) base classes that defines interfaces. The cast to
> an interface class is not done by me but implicitly when I call
> another method which only takes a pointer to such an interface as an
> argument.

There is no problem with casting to a virtual base. The problem only
shows up when this virtual base pointer is used to invoke a virtual
function, and this call, directly or indirectly, appears in the
constructor of the derived class.

Since it is you who writes the constructor of the derived class, it
seems that you can control very well what you are calling.

Regards,
Martin


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