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