Issue |
81046
|
Summary |
[FMV] -Wunused-function incorrectly complains about versioned static functions
|
Labels |
new issue
|
Assignees |
|
Reporter |
jroelofs
|
https://clang.godbolt.org/z/7zdKf8M9r
```
__attribute__((target_version("fp16")))
static int foo(void) { return 1; }
__attribute__((target_version("fp16fml")))
static int foo(void) { return 2; }
__attribute__((target_version("default")))
static int foo(void) { return 0; }
int caller() {
return foo();
}
```
`-Wunused-function -Werror`
```
<source>:2:12: error: unused function 'foo' [-Werror,-Wunused-function]
2 | static int foo(void) { return 1; }
| ^~~
<source>:5:12: error: unused function 'foo' [-Werror,-Wunused-function]
5 | static int foo(void) { return 2; }
```
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs