public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "matz at suse dot de" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/22252] New: pragma interface/implementation still break synthesized methods
Date: Thu, 30 Jun 2005 14:55:00 -0000	[thread overview]
Message-ID: <20050630145509.22252.matz@suse.de> (raw)

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


             reply	other threads:[~2005-06-30 14:55 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-06-30 14:55 matz at suse dot de [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20050630145509.22252.matz@suse.de \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).