Bug 23700 - #pragma interface/implementation and -g3
#pragma interface/implementation and -g3
Status: CLOSED DUPLICATE of bug 21280
Product: Red Hat Linux
Classification: Retired
Component: gcc (Show other bugs)
7.0
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Jakub Jelinek
David Lawrence
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2001-01-10 06:11 EST by Han Holl
Modified: 2007-04-18 12:30 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2001-01-10 06:11:42 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Han Holl 2001-01-10 06:11:39 EST
Hello,

When compiled with -g3, no virtual table code is generated with
pragma implementation:

Example:
File a.h:
#pragma interface

class a {
public:
	a();
	virtual ~a();
};

File a.C:

#pragma implementation

#include "a.h"

a::a() {}
a::~a() {}

main(int , char **)
{
}

c++ -g3 a.C

produces:

/tmp/ccnMnzgd.o: In function `a::a(void)':
/home/han/g3bug/a.C:5: undefined reference to `a virtual table'
/tmp/ccnMnzgd.o: In function `a::~a(void)':
/home/han/g3bug/a.C:6: undefined reference to `a virtual table'
collect2: ld returned 1 exit status

When compiled without -g or just -g everything is fine.
This is RH 7.0 gcc-2.96-69

Cheers,

Han Holl
Comment 1 Jakub Jelinek 2001-01-10 06:17:34 EST

*** This bug has been marked as a duplicate of 21280 ***

Note You need to log in before you can comment on or make changes to this bug.