From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10780 invoked by alias); 30 Jun 2005 14:55:15 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 10764 invoked by uid 48); 30 Jun 2005 14:55:12 -0000 Date: Thu, 30 Jun 2005 14:55:00 -0000 From: "matz at suse dot de" To: gcc-bugs@gcc.gnu.org Message-ID: <20050630145509.22252.matz@suse.de> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug c++/22252] New: pragma interface/implementation still break synthesized methods X-Bugzilla-Reason: CC X-SW-Source: 2005-06/txt/msg03578.txt.bz2 List-Id: This is similar to bug 21280, but it is _not_ fixed by the patches therein. In fact it still happens with current 4.0 branch as of 2005-06-30. Compile these files: % cat a.h #include #pragma interface struct A { std::vector vc; }; % cat use.cc #include "a.h" A a; int main() {} % cat a.cc #include #pragma implementation #include "a.h" % g++ -W -Wall -O2 a.cc use.cc a.h:3: warning: inline function ‘A::A()’ used but never defined a.h:3: warning: inline function ‘A::~A()’ used but never defined /tmp/ccuIwMBN.o: In function `__static_initialization_and_destruction_0(int, int)': use.cc:(.text+0x31): undefined reference to `A::A()' collect2: ld returned 1 exit status This is because A::A() is not synthesized, although it should happen in file a.cc (which contains the pragma implementation). So, something still is wrong (this actually breaks building lyx btw.) after 21280 was fixed. -- Summary: pragma interface/implementation still break synthesized methods Product: gcc Version: 4.0.1 Status: UNCONFIRMED Severity: normal Priority: P2 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: matz at suse dot de CC: gcc-bugs at gcc dot gnu dot org,schwab at suse dot de http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22252