<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 --- - Language linkage bleeding to between proper overloads when using long type"
href="http://llvm.org/bugs/show_bug.cgi?id=17540">17540</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Language linkage bleeding to between proper overloads when using long type
</td>
</tr>
<tr>
<th>Product</th>
<td>clang
</td>
</tr>
<tr>
<th>Version</th>
<td>unspecified
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>Windows NT
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Keywords</th>
<td>compile-fail
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>Frontend
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedclangbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>whunt@google.com
</td>
</tr>
<tr>
<th>CC</th>
<td>llvmbugs@cs.uiuc.edu, richard-llvm@metafoo.co.uk
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr></table>
<p>
<div>
<pre>Clang erroneously associates extern "C++" to a function previously declared
extern "C".
file.cpp:
extern "C" long _InterlockedIncrement(long volatile *_Addend);
extern "C++" unsigned long _InterlockedIncrement(unsigned long volatile
*Addend);
extern "C" long _InterlockedIncrement(long volatile *_Addend);
Should not issue any diagnostics but gives the following instead:
file.cpp:3:17: error: declaration of '_InterlockedIncrement' has a different
language linkage
extern "C" long _InterlockedIncrement(long volatile *_Addend);
^
file.cpp:1:17: note: previous declaration is here
extern "C" long _InterlockedIncrement(long volatile *_Addend);
Clearly the diagnostic is misleading at best. It appears that the extern "C++"
line is actually stomping the linkage of the previous extern "C" line, despite
the "C++" line being a proper overload.
I believe the bug is specific to "long"/"unsigned long" and does not occur with
other tested types(int, short, __int64).</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>