This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/24986] New: g++ is confused when function is defined inside and outside some namespace and called with '::' prefix
- From: "relf at os2 dot ru" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 22 Nov 2005 04:33:10 -0000
- Subject: [Bug c++/24986] New: g++ is confused when function is defined inside and outside some namespace and called with '::' prefix
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
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