This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/29773] New: name mangling for nested functions is wrong
- From: "geoffk at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 9 Nov 2006 02:50:56 -0000
- Subject: [Bug c++/29773] New: name mangling for nested functions is wrong
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
Given the following translation unit:
inline int (*foo())()
{
struct localstruct {
static int f() {
return 3;
}
};
return localstruct::f;
}
GCC mangles foo::localstruct::f as '_ZZ3foovEN11localstruct1fEv'.
According to the C++ ABI (see especially the third example in section 5.1.6) it
should be
_ZNZ3foovE11localstruct1fEv
That is, it should be <function name> <bare-function-type> at the top level,
not a <local-name>.
This is of course an ABI-breaking change.
--
Summary: name mangling for nested functions is wrong
Product: gcc
Version: 4.3.0
Status: UNCONFIRMED
Keywords: ABI
Severity: major
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: geoffk at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29773