[LLVMbugs] [Bug 22621] New: Itanium ABI: mangling issue with external names in template args (gcc vs. ABI)
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Tue Feb 17 15:47:03 PST 2015
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: unassignedclangbugs at nondot.org
Reporter: Wolfgang_Pieb at playstation.sony.com
CC: llvmbugs at cs.uiuc.edu
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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20150217/ab29ba65/attachment.html>
More information about the llvm-bugs
mailing list