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

            Bug ID: 22621
           Summary: Itanium ABI: mangling issue with external names in
                    template args (gcc vs. ABI)
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: normal
          Priority: P
         Component: LLVM Codegen
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected]
    Classification: Unclassified

The following example from the ABI (5.1.5)

void foo(char) {}
template <void (&)(char)> struct CB {};
void bar(CB<foo> cb) {}

produces the following mangling for bar():

_Z3bar2CBILZ3foocEE

According to the ABI the 'Z' in the middle is supposed to be
preceded by an underscore, foo being a name with external linkage.

There's a FIXME comment in CXXNameMangler::mangleTemplateArg() in
ItaniumMangle.cpp saying that gcc leaves out the underscore. This
is why clang does so, too.

Is the priority to conform to the ABI or to be as compatible with
gcc as possible?

-- 
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