public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/53711] New: Wunused-function should warn for functions in the unnamed namespace
@ 2012-06-17 19:51 david at doublewise dot net
  2012-06-20 18:47 ` [Bug c++/53711] " daniel.kruegler at googlemail dot com
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: david at doublewise dot net @ 2012-06-17 19:51 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53711

             Bug #: 53711
           Summary: Wunused-function should warn for functions in the
                    unnamed namespace
    Classification: Unclassified
           Product: gcc
           Version: 4.8.0
            Status: UNCONFIRMED
          Severity: enhancement
          Priority: P3
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: david@doublewise.net


Wunused-function currently only warns for functions that are declared as static
that are never used / defined. It should also warn about functions placed in
the unnamed namespace, such as:

namespace {
void f();
}

Such functions have similar mechanics to static functions. In particular, they
can only be referenced in the translation unit, so the compiler knows for
certain that if the function is not used in this translation unit, it is not
used.


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-03-24 13:23 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-06-17 19:51 [Bug c++/53711] New: Wunused-function should warn for functions in the unnamed namespace david at doublewise dot net
2012-06-20 18:47 ` [Bug c++/53711] " daniel.kruegler at googlemail dot com
2014-03-14 15:21 ` jason at gcc dot gnu.org
2015-03-24 13:41 ` paolo.carlini at oracle dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).