Bug 23700 - #pragma interface/implementation and -g3
Summary: #pragma interface/implementation and -g3
Status: CLOSED DUPLICATE of bug 21280
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: gcc
Version: 7.0
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact: David Lawrence
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2001-01-10 11:11 UTC by Han Holl
Modified: 2007-04-18 16:30 UTC (History)
0 users

(edit)
Clone Of:
(edit)
Last Closed: 2001-01-10 11:11:42 UTC


Attachments (Terms of Use)

Description Han Holl 2001-01-10 11:11:39 UTC
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 11:17:34 UTC

*** 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.