From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7984 invoked by alias); 25 Aug 2013 21:55:24 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 7939 invoked by uid 48); 25 Aug 2013 21:55:23 -0000 From: "gdr at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug ada/58239] [4.9 regression] pretty-print.c:789: undefined reference to `operator delete(void*)' Date: Sun, 25 Aug 2013 21:55:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: ada X-Bugzilla-Version: 4.9.0 X-Bugzilla-Keywords: build X-Bugzilla-Severity: normal X-Bugzilla-Who: gdr at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2013-08/txt/msg01304.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58239 --- Comment #6 from Gabriel Dos Reis --- (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