This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/28409] New: extern "C" and anonymous namespace


namespace
{
        extern "C" int shouldIbevisible()
        {
                return 101;
        }
}

extern "C" int Iamvisible()
{
        return 101;
}

Is shouldIbevisible supposed to be a visible symbol outside of the current
compilation unit, so that other cu that does say
extern "C" int shouldIbevisible();
int foo () { return shouldIbevisible(); }
would link with it?  If yes, we need to change determine_visibility and
push_namespace_with_attribs to take DECL_EXTERN_C_FUNCTION_P into account.


-- 
           Summary: extern "C" and anonymous namespace
           Product: gcc
           Version: 4.2.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: jakub at redhat dot com


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]