GCC 2.95.2 bug report

Martin v. Loewis martin@loewis.home.cs.tu-berlin.de
Tue Apr 4 15:57:00 GMT 2000


> This is the simplest example I can find of a bug we
> ran into with GCC 2.95.2 involving pointers to member
> functions with nested classes.  Although this code
> compiles and runs correctly under GCC2.8.1 and EGCS 2.91.66,
> GCC 2.95.2 produces an exectuable which seg-faults at the
> point of calling a member function through a pointer. 

Thanks for your bug report. AFAICT, this is a known bug and has been
fixed in the mainline compiler (2.96 20000326 (experimental)), which
compiles your code correctly. To work-around the problem, you'll have
to define a virtual function inside Class, e.g. a virtual destructor.

Regards,
Martin


More information about the Gcc-bugs mailing list