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: [email protected]
        ReportedBy: [email protected]
                CC: [email protected], [email protected],
                    [email protected]
    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.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to