bug report

David R Bacon dbacon@const.ml.org
Thu Apr 30 20:13:00 GMT 1998

	I am not sure what I am supposed to do here, so.. here's what I

	I attempted to do "C" stuff with a C++ compiler..
Inside a class, I have a function pointer that was meant to point to
either one of two other member functions(pointless I know).  This object
compiled ok, but when I make a reference to this function, the compiler
crashes with:

bash-2.01$ make
g++ -Wall -O4 -g -DDEBUG -include debug.h -c Pipe.cpp
g++ -Wall -O4 -g -DDEBUG -include debug.h -c Board.cpp
Board.cpp: In method `void Board::paintBoard()':
Board.cpp:46: Internal compiler error.
Board.cpp:46: Please submit a full bug report to `egcs-bugs@cygnus.com'.
make: *** [Board.o] Error 1

	- class Pipe contains the function pointer, Board::paintBoard uses
the function.

I fixed the problem by making another class APipe extend Pipe, overloading
the virtual function Pipe::paint.  This is the correct way to implement it
in C++ anyway, but I thought you might want this bug report(if it's indeed
a bug) at least to make the compiler exit giving the correct error

Hope I am not wasting your time,
Thanks for the awesome free software,

	Dave Bacon

More information about the Gcc-bugs mailing list