This is the mail archive of the gcc-bugs@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]

Bug in egcs-1.1.2


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


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