<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 --- - Confusing warning description [-Wmissing-variable-declarations]"
href="http://llvm.org/bugs/show_bug.cgi?id=17566">17566</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Confusing warning description [-Wmissing-variable-declarations]
</td>
</tr>
<tr>
<th>Product</th>
<td>clang
</td>
</tr>
<tr>
<th>Version</th>
<td>3.3
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>Windows NT
</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>Static Analyzer
</td>
</tr>
<tr>
<th>Assignee</th>
<td>kremenek@apple.com
</td>
</tr>
<tr>
<th>Reporter</th>
<td>andrew.b.coleman@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 a variable that I intend to keep internal to a file, but neglected to
add static to its declaration. At first blush when reading this warning
description, I was confused by the notion that the assumption is that I should
have an extern declaration prior to it, due to missing the "non-static" portion
of the description. The warning is below:
E:\projects\dwarvenly-client\src\images.c:41:5: warning: no previous extern
declaration for non-static variable 'images' [-Wmissing-variable-declarations]
map images = {.items= nil, .items_desc= & META_OF(uint32), .len=0, .cap=0,
.items_stride=0};
Wouldn't information like having an extern declaration or adding static be more
appropriate to both be listed in a fix-it, instead of almost the entire warning
assuming one context?</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>