[LLVMbugs] [Bug 17566] New: Confusing warning description [-Wmissing-variable-declarations]
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Sun Oct 13 19:20:06 PDT 2013
http://llvm.org/bugs/show_bug.cgi?id=17566
Bug ID: 17566
Summary: Confusing warning description
[-Wmissing-variable-declarations]
Product: clang
Version: 3.3
Hardware: PC
OS: Windows NT
Status: NEW
Severity: enhancement
Priority: P
Component: Static Analyzer
Assignee: kremenek at apple.com
Reporter: andrew.b.coleman at gmail.com
CC: llvmbugs at cs.uiuc.edu
Classification: Unclassified
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?
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20131014/ca367258/attachment.html>
More information about the llvm-bugs
mailing list