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: [email protected]
Reporter: [email protected]
CC: [email protected]
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.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs