<html>
<head>
<base href="http://llvm.org/bugs/" />
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW --- - Mangling of nullptr_t values do not follow ABI"
href="http://llvm.org/bugs/show_bug.cgi?id=17141">17141</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Mangling of nullptr_t values do not follow ABI
</td>
</tr>
<tr>
<th>Product</th>
<td>clang
</td>
</tr>
<tr>
<th>Version</th>
<td>3.2
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>other
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>C++11
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedclangbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>hstong@ca.ibm.com
</td>
</tr>
<tr>
<th>CC</th>
<td>dgregor@apple.com, llvmbugs@cs.uiuc.edu
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr></table>
<p>
<div>
<pre>The C++ ABI document (available at
<a href="http://mentorembedded.github.io/cxx-abi/abi.html#mangle.expr-primary">http://mentorembedded.github.io/cxx-abi/abi.html#mangle.expr-primary</a>) specifies
a mangling for the nullptr literal.
The mangling that Clang produces is not consistent with the form specified by
the ABI; namely, "LDn0E" is generated by Clang instead of "LDnE".
ICC mangles using the ABI-specified form: "LDnE".
Note that nullptr_t is not an integer type. It is contrary to the specification
to apply the production for integer literals to a literal of type nullptr_t.
### SMALL SOURCE (nullptrValueMangle.cc):
typedef decltype(nullptr) NullPtrType;
template <NullPtrType> void foo();
template <> void foo<nullptr>() { }
### ACTUAL MANGLED NAME:
<span class="quote">> clang++ -std='c++11' -c -o nullptrValueMangle.o nullptrValueMangle.cc && nm nullptrValueMangle.o</span >
00000000 b .bss
00000000 d .data
00000000 t .text
00000000 T __Z3fooILDn0EEvv
### EXPECTED MANGLED NAME:
__Z3fooILDnEEvv
### clang++ -v:
<span class="quote">> clang++ -v</span >
clang version 3.2 (trunk 158227)
Target: i386-pc-cygwin
Thread model: posix</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are on the CC list for the bug.</li>
</ul>
</body>
</html>