This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/22206] New: gcc overload resolution fails to follow "using" in some cases
- From: "kjd at duda dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 27 Jun 2005 23:00:16 -0000
- Subject: [Bug c++/22206] New: gcc overload resolution fails to follow "using" in some cases
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
gcc-3.4.3 fails to accept this valid program:
namespace Fwk {
int valueToStrep( char const * ) { return 100;}
}
using Fwk::valueToStrep;
namespace Foo {
int valueToStrep( int ) { return 200; }
int foo2() { return valueToStrep( "hello" ); }
}
If you comment out the second "valueToStrep" function (the one that returns
200), then the program compiles as expected.
If you add a "using Fwk::valueToStrep" to "namespace Foo", then the program
compiles as expected.
This may be related to bug 20724.
Thanks,
-Ken
--
Summary: gcc overload resolution fails to follow "using" in some
cases
Product: gcc
Version: 3.4.3
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: kjd at duda dot org
CC: gcc-bugs at gcc dot gnu dot org
GCC build triplet: i386-redhat-linux
GCC host triplet: i386-redhat-linux
GCC target triplet: i386-redhat-linux
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22206