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

Reply via email to