http://llvm.org/bugs/show_bug.cgi?id=13735
Bug #: 13735
Summary: Ordered comparison with pointer not detected
Product: clang
Version: 3.0
Platform: All
OS/Version: All
Status: NEW
Severity: enhancement
Priority: P
Component: Static Analyzer
AssignedTo: [email protected]
ReportedBy: [email protected]
CC: [email protected]
Classification: Unclassified
--------------------------
int main (void)
{
void *volatile qwe = main;
if (qwe < 0)
return 1;
return 0;
}
--------------------------
$ gcc -Wall -Wextra zxc.c
zxc.c: In function 'main':
zxc.c:5:11: warning: ordered comparison of pointer with integer zero [-Wextra]
zxc.c:8:11: warning: comparison between pointer and integer [enabled by
default]
$ clang -Wall -Wextra --analyze zxc.c
$ gcc --version
gcc-4.6.real (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3
$ clang --version
Ubuntu clang version 3.0-6ubuntu3 (tags/RELEASE_30/final) (based on LLVM 3.0)
--------------------------
So, Clang does not detect very important bug in my code.
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- 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