[llvm-bugs] [Bug 33141] New: -Wmissing-prototypes false positive for function indirectly in anonymous namespace
via llvm-bugs
llvm-bugs at lists.llvm.org
Tue May 23 06:53:41 PDT 2017
https://bugs.llvm.org/show_bug.cgi?id=33141
Bug ID: 33141
Summary: -Wmissing-prototypes false positive for function
indirectly in anonymous namespace
Product: clang
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: -New Bugs
Assignee: unassignedclangbugs at nondot.org
Reporter: abigail.buccaneer at gmail.com
CC: llvm-bugs at lists.llvm.org
Consider the following C++ code:
void global() {}
namespace { void anonymous() {} }
namespace detail { void detail() {} }
namespace detail { namespace { void detail_anonymous() {} } }
namespace { namespace detail { void anonymous_detail() {} } }
The functions global() and detail() should result in -Wmissing-prototypes
warnings. Clang 3.7 to trunk correctly warn on those, but also incorrectly warn
on anonymous_detail(). Clang does correctly optimize out anonymous_detail()
when it's unused.
GCC 4.9 to 6.3 (with '-Wmissing-declarations') correctly warns only on global()
and detail().
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20170523/732a3b50/attachment-0001.html>
More information about the llvm-bugs
mailing list