<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 - Single line of C++ "template <>;" gives no errors, but does with other compilers"
href="https://bugs.llvm.org/show_bug.cgi?id=39867">39867</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Single line of C++ "template <>;" gives no errors, but does with other compilers
</td>
</tr>
<tr>
<th>Product</th>
<td>new-bugs
</td>
</tr>
<tr>
<th>Version</th>
<td>trunk
</td>
</tr>
<tr>
<th>Hardware</th>
<td>Macintosh
</td>
</tr>
<tr>
<th>OS</th>
<td>MacOS X
</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>new bugs
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>sean@rogue-research.com
</td>
</tr>
<tr>
<th>CC</th>
<td>htmldeveloper@gmail.com, llvm-bugs@lists.llvm.org
</td>
</tr></table>
<p>
<div>
<pre>clang reports no syntax errors for this single line .cxx file:
--------------------------
template <>;
--------------------------
leprechaun:~ sean$ clang --version
clang version 8.0.0 (trunk 347180)
Target: x86_64-apple-darwin17.7.0
Thread model: posix
InstalledDir: /Users/sean/llvm/llvm-rel-install/bin
leprechaun:~ sean$ clang -fsyntax-only ~/Desktop/test.cxx
/Users/sean/Desktop/test.cxx:1:13: warning: declaration does not declare
anything [-Wmissing-declarations]
template <>;
^
1 warning generated.
cppcheck 1.85, gcc 7.3.0, and VisualStudio 2017 give an error.
I arrived at this silly file by using creduce to make a reduced test case for
valid code that cppcheck was rejecting. So my 'interestingness test' was:
something that cppcheck reported an error for, but clang did not.</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>