[LLVMbugs] [Bug 9786] New: gcc incompatiblity: -Wunused-functions warns about unused functions in unnamed namespaces
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Sat Apr 23 17:01:28 PDT 2011
http://llvm.org/bugs/show_bug.cgi?id=9786
Summary: gcc incompatiblity: -Wunused-functions warns about
unused functions in unnamed namespaces
Product: clang
Version: unspecified
Platform: PC
OS/Version: All
Status: NEW
Severity: normal
Priority: P
Component: C++
AssignedTo: unassignedclangbugs at nondot.org
ReportedBy: nicolasweber at gmx.de
CC: llvmbugs at cs.uiuc.edu, dgregor at apple.com
$ 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.
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
More information about the llvm-bugs
mailing list