[Bug ada/58239] [4.9 regression] pretty-print.c:789: undefined reference to `operator delete(void*)'

gdr at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Sun Aug 25 21:55:00 GMT 2013


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58239

--- Comment #6 from Gabriel Dos Reis <gdr at gcc dot gnu.org> ---
(In reply to Eric Botcazou from comment #4)
> > OK, I see the emitted reference to 'operator delete', and I suspect I
> > have an idea of why the compiler generated this reference even though
> > it isn't used anywhere in the input source code.
> > 
> > Why are we linking gnatlink with xgcc and not with xg++ -nostdc++?
> 
> Because we haven't had a real need up to now, IOW we always managed to
> massage things so as to avoid the dependency.  Maybe it's the end of the
> road...

Well, that was a latent bug in the existing code base.  The Ada front-end
(more specifically gnatmake, gnatlink and consorts) linked against
"common" files from GCC source code, most of which are compiled or are
C++ source files.  It should have linked with xg++.  I have a patch right
out of the door while typing this message.  I hope you get a chance to
review and comment it.  I only changed the parts that I empirically
determined to be in trouble.  I welcome your input as someone who has
a broader view to see whether they are other executables that need
to be linked with xg++.

-- Gaby



More information about the Gcc-bugs mailing list