This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/29356] New: typedef name denoting unnamed class should have external linkage


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]