[LLVMbugs] [Bug 12223] New: extern "C" function gets wrong mangling

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Fri Mar 9 17:02:59 PST 2012


http://llvm.org/bugs/show_bug.cgi?id=12223

             Bug #: 12223
           Summary: extern "C" function gets wrong mangling
           Product: clang
           Version: trunk
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: C++
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: matthewbg at google.com
                CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu,
                    nlewycky at google.com
    Classification: Unclassified


$ cat t.cc
namespace foo {
extern "C" void fn1(struct Bar *);
extern "C" void fn2(struct Bar *);
void fn1(struct Bar *) { }
}

namespace foo {
void fn2(struct Bar *) { }  // clang bug
}

$ g++ -c t.cc && nm t.o | grep fn
0000000000000000 T fn1
000000000000000a T fn2

$ clang -c t.cc && nm t.o | grep fn
0000000000000010 T _ZN3foo3fn2EPNS_3BarE
0000000000000000 T fn1

-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



More information about the llvm-bugs mailing list