This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Bug in egcs-1.1.2
- To: egcs-bugs at egcs dot cygnus dot com
- Subject: Bug in egcs-1.1.2
- From: Rich Neswold <neswold at fnal dot gov>
- Date: Thu, 1 Apr 1999 17:24:34 -0600
- Reply-To: neswold at fnal dot gov
I found a bug in egcs-1.1.2. The following code reproduces it.
class A {
public:
virtual void print() = 0;
};
int main()
{
A().print();
return 0;
}
The compiler doesn't report that class A is an abstract class. The linker
reports that A::print() is an unresolved symbol. If I change main() to
this:
int main()
{
A a;
a.print();
return 0;
}
the compiler correctly reports that class A is abstract and the compilation
fails.
EGCS Release:
gcc version egcs-2.91.66 19990314 (egcs-1.1.2 release)
System type:
FreeBSD 2.2.8-STABLE - i386
Command line:
g++ -g junk.cpp
--
Rich
------------------------------------------------------------------------
Richard Neswold, Beams Division / Controls Dept | neswold@fnal.gov
Fermilab, PO Box 500, MS 347, Batavia, IL 60510 | voice 1.630.840.3454
'finger neswold@aduxb.fnal.gov' for PGP key | fax 1.630.840.3093