non-virtual + virtual inheritance bug

Stuart Brooks
Tue Feb 22 12:41:00 GMT 2005

> Stuart Brooks wrote:
> > I have found what I believe to be a bug in g++ 2.91.60 on NetBSD 1.4.1.
> > ... the problem goes away. As I mentioned this all works in 3.3.3. but
> > unfortunately I am tied to using my existing OS/compiler for historical
> > reasons.
> Sorry, but that compiler is waaay old.  If you are sticking with that
> version, you're either going to have to fix it yourself, or enter a
> contract with someone who can.
> This particular bug is likely to be hard to fix, without breaking ABI
> compatibility.  It depends on precisely how the old dynamic cast machinery
> worked and I'd have to go and look them up.
> nathan

Thanks for the reply. I know the compiler is old and I'm not expecting
anyone to go and fix it now, I just wanted to know if anyone else had seen
the problem or had any ideas about it. I have a work-around (include virtual
bases first) which I'll use in this case and I'll be careful in future...


More information about the Gcc-help mailing list