From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14962 invoked by alias); 29 Dec 2009 14:44:38 -0000 Received: (qmail 14938 invoked by uid 48); 29 Dec 2009 14:44:25 -0000 Date: Tue, 29 Dec 2009 14:44:00 -0000 Subject: [Bug other/42540] New: c++ error message [vtable undefined] is unhelpful X-Bugzilla-Reason: CC Message-ID: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "debian-gcc at lists dot debian dot org" 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 X-SW-Source: 2009-12/txt/msg02635.txt.bz2 class A { A(); virtual void B(); }; A::A() {} /* Whoops, I forgot to define A::B() */ $ g++ -Wall a.cc /usr/lib/../lib/crt1.o: In function `_start': (.text+0x20): undefined reference to `main' /tmp/ccaVlePI.o: In function `A::A()': a.cc:(.text+0xf): undefined reference to `vtable for A' collect2: ld returned 1 exit status bug submitter writes: "To be clear: the problem is that the error message only mentions the constructor, and the vtable. It doesn't mention the method A::B(), which is actually the problem. On a less-minimal example it could take much longer to work out what the real problem is." -- Summary: c++ error message [vtable undefined] is unhelpful Product: gcc Version: 4.5.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: other AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: debian-gcc at lists dot debian dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42540