Closed
Description
Bugzilla Link | 43573 |
Version | trunk |
OS | Linux |
Reporter | LLVM Bugzilla Contributor |
CC | @DougGregor,@zygoloid,@Weverything |
Extended Description
clang-10 falls to emit the warning for the following:
$ cat s.c
int main(){
int a;
int b = (0!=((-1)|((a = 1) == 1)));
return 0;
}
$ clang-10 -Wtautological-compare s.c
clang version 10.0.0 (https://github.com/llvm/llvm-project.git 49c4e58)
Target: x86_64-unknown-linux-gnu
Thread model: posix
$ gcc-9.1 -Wtautological-compare s.c
s.c:3:12: warning:bitwise comparison always evaluates to true [-Wtautological-compare]
3 | int b = (0!=((-1)|((c = 1) == 1)));
| ^~