[LLVMbugs] [Bug 16074] New: Warn on boolean conversion of arrays
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Mon May 20 11:14:24 PDT 2013
http://llvm.org/bugs/show_bug.cgi?id=16074
Bug ID: 16074
Summary: Warn on boolean conversion of arrays
Product: clang
Version: trunk
Hardware: PC
OS: All
Status: NEW
Severity: enhancement
Priority: P
Component: Frontend
Assignee: unassignedclangbugs at nondot.org
Reporter: benny.kra at gmail.com
CC: llvmbugs at cs.uiuc.edu
Classification: Unclassified
GCC warns on this:
void foo(bool);
int main() {
int arr[42];
foo(arr);
}
bool.cpp:5:10: warning: the address of ‘arr’ will always evaluate as ‘true’
[-Waddress]
clang has this warning for functions "foo(main)", we should enable it for
arrays and other local pointers too.
--
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/20130520/d6f137fc/attachment.html>
More information about the llvm-bugs
mailing list