<html>
<head>
<base href="http://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 --- - cland: Re-declaration of a local variable inside a for-loop is allowed"
href="http://llvm.org/bugs/show_bug.cgi?id=18787">18787</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>cland: Re-declaration of a local variable inside a for-loop is allowed
</td>
</tr>
<tr>
<th>Product</th>
<td>clang
</td>
</tr>
<tr>
<th>Version</th>
<td>3.3
</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>libclang
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedclangbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>davide.italiano@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>The previous snippet builds fine while I would expect something like
"redeclaration of i without linkage".
[code]
#include <stdio.h>
int
main(void)
{
int i;
for (int i = 0; i < 100; ++i) { }
return (0);
}
[/code]
Environment:
$ clang --version
Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
Target: x86_64-apple-darwin13.0.1
Thread model: posix
$ uname -a
Darwin Davides-MacBook-Pro.local 13.0.1 Darwin Kernel Version 13.0.1: Thu Sep
19 19:30:57 PDT 2013; root:xnu-2422.50.20~2/RELEASE_X86_64 x86_64</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>