| Issue |
64783
|
| Summary |
Missing -Wsign-compare warning with enum values
|
| Labels |
|
| Assignees |
|
| Reporter |
alexhenrie
|
```c
#include <stdio.h>
int main()
{
signed int a = 1;
enum : signed int { b = 1 };
unsigned int c = -1;
if (a < c) // condition is true, -Wsign-compare warns about it
puts("a < c");
if (b < c) // condition is true, but no warning
puts("b < c");
return 0;
}
```
The compiler should warn about both if statements.
$ clang --version
clang version 15.0.7
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/bin
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs