This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: g++ bug report
- To: luethje at ert dot rwth-aachen dot de
- Subject: Re: g++ bug report
- From: "Martin v. Loewis" <martin at loewis dot home dot cs dot tu-berlin dot de>
- Date: Thu, 2 Mar 2000 20:36:05 +0100
- CC: gcc-bugs at gcc dot gnu dot org, gcc-patches at gcc dot gnu dot org
- References: <38BE4BBC.DE42E569@ert.rwth-aachen.de>
> Compile this little program. When you run the executable
> it will crash. The pure virtual function in class B
> makes no sense, since it is already implemented in class A.
> Though the compiler does not complain at all, but produces
> wrong code.
Thanks for your bug report. This is (at least to me) a known bug in
g++, which is caused by the limited format of pointers to virtual
methods. The only solution I see which does not require an ABI change
is described in
http://gcc.gnu.org/ml/gcc-patches/2000-01/msg00250.html
Since there hasn't been a definitive rejection of this patch, I'd
still like to know whether it should be applied to gcc, perhaps even
to the release branch. That would give the requested complaint,
instead of crashing code. I know that the new ABI will fix this
problem, but I think having the sorry message until then would be
helpful.
Olaf, as a work-around, you can use a void (A::*)().
Regards,
Martin