-
Notifications
You must be signed in to change notification settings - Fork 15.2k
Open
Labels
Description
| Bugzilla Link | 10721 |
| Version | trunk |
| OS | Linux |
| Reporter | LLVM Bugzilla Contributor |
| CC | @tkremenek |
Extended Description
clang version 3.0 (trunk 138324)
Target: x86_64-unknown-linux-gnu
Running this through the static analyser:
struct S { unsigned long long x; };
int f(struct S *p) {
if (p->x != (unsigned)p->x)
return 1;
else
return 2;
}
yields the warning:
clangbug.c:3:14: warning: Both operands to '!=' always have the same value
if (p->x != (unsigned)p->x)
~~~~ ^ ~~~~~~~~~~~~~~