http://d.puremagic.com/issues/show_bug.cgi?id=4059

           Summary: Incorrect C++ name mangling
           Product: D
           Version: 2.041
          Platform: Other
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nob...@puremagic.com
        ReportedBy: rob...@octarineparrot.com


--- Comment #0 from Robert Clipsham <rob...@octarineparrot.com> 2010-04-03 
22:08:14 BST ---
b.cpp:
----
struct elem { };
void foobar(elem*, elem*) {}
----
a.d:
----
struct elem { }
extern(C++)void foobar(elem*, elem*);
void main(){
        elem *a;
        foobar(a, a);
}
----
Compile with:
$ gcc -c b.cpp -ob.o
$ dmd a.d b.o
This gives linking errors, as dmd does not mangle foobar properly. According to
nm, the correct mangle (found in b.cpp) is:
_Z6foobarP4elem
But dmd mangles it as:
_Z6foobarP4elemS_

Again, this is a blocker for ddmd on linux.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------

Reply via email to