<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 - Artificial errors due to parser guessing"
href="https://bugs.llvm.org/show_bug.cgi?id=34094">34094</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Artificial errors due to parser guessing
</td>
</tr>
<tr>
<th>Product</th>
<td>clang
</td>
</tr>
<tr>
<th>Version</th>
<td>4.0
</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>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>joriswu@gmail.com
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org
</td>
</tr></table>
<p>
<div>
<pre>The frontend makes guesses at input errors, such as at missing declarations :
int my_scalars[100];
int foo(int x)
{
my_scalar = 1;
}
// here we forgot to declare my_scalar as a plain int. First, the compiler
correctly emits :
error: use of undeclared 'my_scalar'; did you mean 'my_scalars' ?
But then the parser appears to actually insert the assumed array into the code,
and issues a false subsequent error that is misleading :
error: array type 'int [100]' is not assignable
I have seen more examples, where the 'guess' is actually used.</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>