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: unassig...@gcc.gnu.org
        ReportedBy: da...@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.

Reply via email to