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

Re: g++ bug report


> 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


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