public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/22252] New: pragma interface/implementation still break synthesized methods
@ 2005-06-30 14:55 matz at suse dot de
  2005-06-30 14:57 ` [Bug c++/22252] [4.0/4.1 Regression] " pinskia at gcc dot gnu dot org
                   ` (7 more replies)
  0 siblings, 8 replies; 10+ messages in thread
From: matz at suse dot de @ 2005-06-30 14:55 UTC (permalink / raw)
  To: gcc-bugs

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 <vector> 
#pragma interface 
struct A { 
  std::vector<char> vc; 
}; 
% cat use.cc 
#include "a.h" 
A a; 
int main() {} 
% cat a.cc 
#include <vector> 
#pragma implementation 
#include "a.h" 
 
% g++ -W -Wall -O2 a.cc use.cc  
a.h:3: warning: inline function &#8216;A::A()&#8217; used but never defined 
a.h:3: warning: inline function &#8216;A::~A()&#8217; 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


^ permalink raw reply	[flat|nested] 10+ messages in thread
[parent not found: <bug-22252-183@http.gcc.gnu.org/bugzilla/>]

end of thread, other threads:[~2006-01-15 22:43 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-06-30 14:55 [Bug c++/22252] New: pragma interface/implementation still break synthesized methods matz at suse dot de
2005-06-30 14:57 ` [Bug c++/22252] [4.0/4.1 Regression] " pinskia at gcc dot gnu dot org
2005-06-30 15:01 ` matz at suse dot de
2005-06-30 15:10 ` pinskia at gcc dot gnu dot org
2005-06-30 15:24 ` matz at suse dot de
2005-09-07  0:11 ` mmitchel at gcc dot gnu dot org
2005-09-09 16:34 ` [Bug c++/22252] [4.0 " mmitchel at gcc dot gnu dot org
2005-09-09 18:56 ` cvs-commit at gcc dot gnu dot org
2005-09-27 16:21 ` mmitchel at gcc dot gnu dot org
     [not found] <bug-22252-183@http.gcc.gnu.org/bugzilla/>
2006-01-15 22:43 ` [Bug c++/22252] [4.0/4.1 " mmitchel at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).