gcc incompatiblity: -Wunused-functions warns about unused functions in unnamed namespaces #10158
Labels
bugzilla
Issues migrated from bugzilla
c++
clang:diagnostics
New/improved warning or error message in Clang, but not in clang-tidy or static analyzer
wontfix
Issue is real, but we can't or won't fix it. Not invalid
Extended Description
$ cat test.cc
namespace {
void f() {}
}
$ gcc -Wunused-functions test.cc
$ clang -Wunused-functions test.cc
test.cc:2:6: warning: unused function 'f' [-Wunused-function]
void f() {}
^
1 warning generated.
clang r129794 suggests that clang tries to be compatible with gcc here, so this warning should be moved to -Wunneeded-internal-declaration.
The text was updated successfully, but these errors were encountered: