<html>
<head>
<base href="https://bugs.llvm.org/">
</head>
<body><span class="vcard"><a class="email" href="mailto:dblaikie@gmail.com" title="David Blaikie <dblaikie@gmail.com>"> <span class="fn">David Blaikie</span></a>
</span> changed
<a class="bz_bug_link
bz_status_RESOLVED bz_closed"
title="RESOLVED INVALID - extern template classes, clang produces object code with 1 weak symbol, but ld gives undefined reference (ld accepts gcc object code)"
href="https://bugs.llvm.org/show_bug.cgi?id=35239">bug 35239</a>
<br>
<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>What</th>
<th>Removed</th>
<th>Added</th>
</tr>
<tr>
<td style="text-align:right;">Status</td>
<td>NEW
</td>
<td>RESOLVED
</td>
</tr>
<tr>
<td style="text-align:right;">CC</td>
<td>
</td>
<td>dblaikie@gmail.com
</td>
</tr>
<tr>
<td style="text-align:right;">Resolution</td>
<td>---
</td>
<td>INVALID
</td>
</tr></table>
<p>
<div>
<b><a class="bz_bug_link
bz_status_RESOLVED bz_closed"
title="RESOLVED INVALID - extern template classes, clang produces object code with 1 weak symbol, but ld gives undefined reference (ld accepts gcc object code)"
href="https://bugs.llvm.org/show_bug.cgi?id=35239#c2">Comment # 2</a>
on <a class="bz_bug_link
bz_status_RESOLVED bz_closed"
title="RESOLVED INVALID - extern template classes, clang produces object code with 1 weak symbol, but ld gives undefined reference (ld accepts gcc object code)"
href="https://bugs.llvm.org/show_bug.cgi?id=35239">bug 35239</a>
from <span class="vcard"><a class="email" href="mailto:dblaikie@gmail.com" title="David Blaikie <dblaikie@gmail.com>"> <span class="fn">David Blaikie</span></a>
</span></b>
<pre>The program you have appears to be ill-formed, though no diagnostic is required
to be produced by the implementation.
C++17, [temp.explicit]p11 states:
"An entity that is the subject of an explicit instantiation declaration and
that is also used in a way that would otherwise cause an implicit instantiation
(17.7.1) in the translation unit shall be the subject of an explicit
instantiation definition somewhere in the program;"
& your program has an explicit instantiation declaration:
extern template class demo<int>;
But doesn't appear to have a corresponding explicit instantiation definition:
template class demo<int>;
Anywhere.</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>