c++/7221: wrong linkage in member functions of typedef-named classes

aoliva@redhat.com aoliva@redhat.com
Sat Jul 6 09:26:00 GMT 2002


>Number:         7221
>Category:       c++
>Synopsis:       wrong linkage in member functions of typedef-named classes
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Jul 06 09:26:00 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:     aoliva@redhat.com
>Release:        gcc-3.1, as well as many (all?) older releases and newer snapshots
>Organization:
>Environment:
any
>Description:
Given:

  typedef struct {
    void f();
  } S;

GCC will assume f has no linkage, because at the point of the declaration, the class is anonymous.

Details at http://gcc.gnu.org/ml/gcc-patches/2002-07/threads.html#00266
>How-To-Repeat:
Testcase is g++.old-deja/g++.oliva/linkage1.C
>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the Gcc-prs mailing list