<html>
<head>
<base href="https://bugs.llvm.org/">
</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 - explicit specialization of variable template has wrong behavior regarding 'static'"
href="https://bugs.llvm.org/show_bug.cgi?id=35863">35863</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>explicit specialization of variable template has wrong behavior regarding 'static'
</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>Linux
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>enhancement
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>C++14
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedclangbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>richard-llvm@metafoo.co.uk
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org
</td>
</tr></table>
<p>
<div>
<pre>Case #1:
template<int> static int n;
template<> int n<0>;
Case #2:
template<int> int n;
template<> static int n<0>;
Case #3:
template<int> static int n;
template<> static int n<0>;
For case #1, clang should treat n<0> as being an internal-linkage variable, but
it actually gives it external linkage.
For case #2 and #3, clang should reject ([dcl.stc]p3: A storage-class-specifier
other than thread_local shall not be specified in an explicit specialization).
We appear to get this right for function templates and for explicit
instantiations of variable templates.</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>