<html>
<head>
<base href="https://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 --- - Programs with ill-formed declarations not declaring anything compiles" href="https://urldefense.proofpoint.com/v2/url?u=https-3A__llvm.org_bugs_show-5Fbug.cgi-3Fid-3D24203&d=AwMBaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=pF93YEPyB-J_PERP4DUZOJDzFVX5ZQ57vQk33wu0vio&m=0-_Y2pLGeRvY6QUGLlmlNtv1xqDQsygr3ojG2D4XKZE&s=JiPl6askvTstOen0EnXY0ZbmNLU-PwF1tFWbMqIqTrk&e=">24203</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Programs with ill-formed declarations not declaring anything compiles
</td>
</tr>
<tr>
<th>Product</th>
<td>clang
</td>
</tr>
<tr>
<th>Version</th>
<td>trunk
</td>
</tr>
<tr>
<th>Hardware</th>
<td>All
</td>
</tr>
<tr>
<th>OS</th>
<td>All
</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++14
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedclangbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>anders.granlund.0@gmail.com
</td>
</tr>
<tr>
<th>CC</th>
<td>llvmbugs@cs.uiuc.edu
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr></table>
<p>
<div>
<pre>I have found the following c++ standard violations in clang, all related to
ill-formed edge cases of declarations:
* Test-case 1:
int;
int main() {}
This program is ill-formed by [dcl.dcl]/5 in the c++ standard (See
<a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__eel.is_c-2B-2Bdraft_dcl.dcl-235&d=AwMBaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=pF93YEPyB-J_PERP4DUZOJDzFVX5ZQ57vQk33wu0vio&m=0-_Y2pLGeRvY6QUGLlmlNtv1xqDQsygr3ojG2D4XKZE&s=4QMmCDLFpnWloGnWmh6efVEe1Owwzr7lpIc8Jf9mph4&e=">http://eel.is/c++draft/dcl.dcl#5</a> ). Clang compiles it without any error
messages. Since the program is ill-formed, I expect to get at least one error
message.
* Test-case 2:
enum {};
int main() {}
This program is ill-formed by [dcl.dcl]/5 in the c++ standard (See
<a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__eel.is_c-2B-2Bdraft_dcl.dcl-235&d=AwMBaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=pF93YEPyB-J_PERP4DUZOJDzFVX5ZQ57vQk33wu0vio&m=0-_Y2pLGeRvY6QUGLlmlNtv1xqDQsygr3ojG2D4XKZE&s=4QMmCDLFpnWloGnWmh6efVEe1Owwzr7lpIc8Jf9mph4&e=">http://eel.is/c++draft/dcl.dcl#5</a> ). Clang compiles it without any error
messages. Since the program is ill-formed, I expect to get at least one error
message.
* Test-case 3:
typedef typedef int T;
int main() {}
This program is ill-formed by [decl.spec]/2 in the c++ standard (See
<a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__eel.is_c-2B-2Bdraft_dcl.dcl-23dcl.spec-2D2&d=AwMBaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=pF93YEPyB-J_PERP4DUZOJDzFVX5ZQ57vQk33wu0vio&m=0-_Y2pLGeRvY6QUGLlmlNtv1xqDQsygr3ojG2D4XKZE&s=6A9q8npAs7ceOGJcyRS2p0nlPuXacF7K9-2r5yUQqcE&e=">http://eel.is/c++draft/dcl.dcl#dcl.spec-2</a> ). Clang compiles it without any
error messages. Since the program is ill-formed, I expect to get at least one
error message.</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>