This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: internal compiler error for -fall-virtual for 2.95.2 FOLLOW-ON
- To: mcoletti at clark dot net
- Subject: Re: internal compiler error for -fall-virtual for 2.95.2 FOLLOW-ON
- From: "Martin v. Loewis" <martin at loewis dot home dot cs dot tu-berlin dot de>
- Date: Fri, 5 May 2000 10:00:03 +0200
- CC: egcs-bugs at egcs dot cygnus dot com, gcervone at gmu dot edu, lpanait at cs dot gmu dot edu
- References: <00050500145200.15044@megaphone.cs.gmu.edu>
> I've managed to find a workaround that works, and one that *this*
> time will work from here on out. Moreover, I hope that the
> workaround will yield insight into the exact nature of the problem.
Thanks again for your bug report. As I suspected from the beginning,
this is a bug in your code, not in g++.
In C++, all non-pure non-inline virtual methods must be implemented,
whether they are actually called or not. This requirement allows the
compiler to use the implementation of the first non-pure non-inline
virtual method as a guidance for emitting virtual tables and type_info
functions.
Now, if you look at Attribute.h, you'll see that the first such
function is
virtual void print( ostream &, Atom const * ) const;
Also, you'll notice that this is not implemented in Attribute.cpp;
this is your error.
Regards,
Martin