Issue |
148361
|
Summary |
[-Wunused-but-set-variable] False negative with static global variable
|
Labels |
new issue
|
Assignees |
|
Reporter |
alejandro-colomar
|
```c
static int foo;
int
main(void)
{
foo = 42;
}
```
```sh
alx@devuan:~/tmp$ clang -Weverything static.c
alx@devuan:~/tmp$
```
I think this should trigger some diagnostic. The compiler is able to see that the variable is set, but never used.
Or is it too complex to gather such information about a static global?
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs