Functions (and variables I suppose) in an anonymous namespace can't
realisitically be used outside the shared library they are part of (due to the
mangled name being randomized each compile). This means that they could be of
visibility hidden, which 
1) Cuts down on the amount of work for the dynamic linker
2) Means that internal calls to these functions can avoid the PLT trampoline
   (and thus get higher performance)

-- 
           Summary: (optimisation) Functions in anonymous namespaces should
                    default to "hidden" visibility
           Product: gcc
           Version: 4.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: arjanv at redhat dot com
                CC: gcc-bugs at gcc dot gnu dot org


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

Reply via email to