This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/29356] New: typedef name denoting unnamed class should have external linkage
- From: "amylaar at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 5 Oct 2006 14:16:37 -0000
- Subject: [Bug c++/29356] New: typedef name denoting unnamed class should have external linkage
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
In this code:
typedef class
{
public:
void m();
} C;
void
C::m()
{
}
void
f()
{
C c;
c.m();
}
// { dg-final { scan-assembler "(.globl|.global)\[ \t]+[_]+ZN1C1mEv" } }
C is a typedef name which accroding to 7.1.3 is used to denote the unnamed
class. 3.5 ; 4, 3rd item, specifies that this name has external linkage.
Hence, 3.5 ; 5 specifies that C::m ( __ZN1C1mEv) should have external linkage.
However, gcc fails to emit the .global directive for this symbol.
--
Summary: typedef name denoting unnamed class should have external
linkage
Product: gcc
Version: 4.2.0
Status: UNCONFIRMED
Keywords: link-failure
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: amylaar at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29356