c++/6548: Incorrect mangling for extern C and namespace
sdouglass@arm.com
sdouglass@arm.com
Fri May 3 07:56:00 GMT 2002
>Number: 6548
>Category: c++
>Synopsis: Incorrect mangling for extern C and namespace
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Fri May 03 07:56:01 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator: Scott Douglass
>Release: gcc-3.0.4 and later (still present in trunk)
>Organization:
>Environment:
All
>Description:
Neither N::x' nor 'N::y' should be mangled in the example
below but 'N::x' does get mangled. The work-around is to use
the variable in a non-inline function as is done with 'N::y'.
This example works in 2.95.2, because the namespace is never
mangled by 2.95.2.
>How-To-Repeat:
Compile the following code:
extern "C" {
namespace N { extern int x,y;}
}
int N::x = 42; // I'm incorrectly mangled
int f() { return N::y; }
int N::y = 43; // I'm correctly not mangled
>Fix:
Unknown
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the Gcc-bugs
mailing list