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++/13140] New: declaration in global namespace, definition inside named or anon namespace


gcc accept this illegal code, at least with 2.91, 2.95.3 and
gcc version 3.4 20031120 (experimental) so this is not a
regression

struct foo {
  foo();
};


namespace bar {
foo::foo() { }
}

Comeau catch it at foo::foo() definition
error: overloaded function "foo::foo" cannot be defined in the current scope

regards,
Philippe Elie

-- 
           Summary: declaration in global namespace, definition inside named
                    or anon namespace
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: phil dot el at wanadoo dot fr
                CC: gcc-bugs at gcc dot gnu dot org


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


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