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++/24986] New: g++ is confused when function is defined inside and outside some namespace and called with '::' prefix


g++ (GCC) 4.0.3 20051111 (prerelease) (Debian 4.0.2-4)

g++ fails to compile the attached program with the following error

$ g++ bug.cpp
bug.cpp: In member function 'void B::foo(N::C)':
bug.cpp:12: error: cannot convert 'N::C' to 'long int' for argument '1' to
'void foo(long int)'

Note that removing namespace enclosure make the program compile fine.


-- 
           Summary: g++ is confused when function is defined inside and
                    outside some namespace and called with '::' prefix
           Product: gcc
           Version: 4.0.3
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: relf at os2 dot ru


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


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