Index: gcc/cp/name-lookup.c =================================================================== --- gcc/cp/name-lookup.c (revision 191152) +++ gcc/cp/name-lookup.c (working copy) @@ -2504,7 +2504,7 @@ if (new_fn == old_fn) /* The function already exists in the current namespace. */ break; - else if (OVL_USED (tmp1)) + else if (TREE_CODE (tmp1) == OVERLOAD && OVL_USED (tmp1)) continue; /* this is a using decl */ else if (compparms (TYPE_ARG_TYPES (TREE_TYPE (new_fn)), TYPE_ARG_TYPES (TREE_TYPE (old_fn)))) @@ -2519,7 +2519,7 @@ break; else { - error ("%qD is already declared in this scope", name); + diagnose_name_conflict (new_fn, old_fn); break; } } Index: gcc/cp/cp-tree.h =================================================================== --- gcc/cp/cp-tree.h (revision 191152) +++ gcc/cp/cp-tree.h (working copy) @@ -324,7 +324,7 @@ /* If set, this was imported in a using declaration. This is not to confuse with being used somewhere, which is not important for this node. */ -#define OVL_USED(NODE) TREE_USED (NODE) +#define OVL_USED(NODE) TREE_USED (OVERLOAD_CHECK (NODE)) /* If set, this OVERLOAD was created for argument-dependent lookup and can be freed afterward. */ #define OVL_ARG_DEPENDENT(NODE) TREE_LANG_FLAG_0 (OVERLOAD_CHECK (NODE)) Index: gcc/testsuite/g++.dg/overload/using2.C =================================================================== --- gcc/testsuite/g++.dg/overload/using2.C (revision 191152) +++ gcc/testsuite/g++.dg/overload/using2.C (working copy) @@ -45,7 +45,7 @@ extern "C" void exit (int) throw (); extern "C" void *malloc (__SIZE_TYPE__) throw () __attribute__((malloc)); - void abort (void) throw (); + void abort (void) throw (); // { dg-message "previous" } void _exit (int) throw (); // { dg-error "conflicts" "conflicts" } // { dg-message "void _exit" "_exit" { target *-*-* } 49 } @@ -54,14 +54,14 @@ // { dg-message "void C1" "C1" { target *-*-* } 53 } extern "C" void c2 (void) throw (); - void C2 (void) throw (); + void C2 (void) throw (); // { dg-message "previous" } int C3 (int) throw (); using std::malloc; -using std::abort; // { dg-error "already declared" } +using std::abort; // { dg-error "conflicts" } using std::c2; -using std::C2; // { dg-error "already declared" } +using std::C2; // { dg-error "conflicts" } using std::c3; using other::c3; using std::C3; using other::C3; Index: gcc/testsuite/g++.dg/overload/using3.C =================================================================== --- gcc/testsuite/g++.dg/overload/using3.C (revision 0) +++ gcc/testsuite/g++.dg/overload/using3.C (revision 0) @@ -0,0 +1,16 @@ +// { dg-do compile } + +namespace a +{ + void f(int); +} + +namespace b +{ + void f(int); // { dg-message "previous" } + void g() + { + f (3); + } + using a::f; // { dg-error "conflicts" } +} Index: gcc/testsuite/g++.dg/lookup/using9.C =================================================================== --- gcc/testsuite/g++.dg/lookup/using9.C (revision 191152) +++ gcc/testsuite/g++.dg/lookup/using9.C (working copy) @@ -27,5 +27,5 @@ void m() { void f(int); - using B::f; // { dg-error "already declared" } + using B::f; // { dg-error "previous declaration" } } Index: libstdc++-v3/include/tr1/cmath =================================================================== --- libstdc++-v3/include/tr1/cmath (revision 191152) +++ libstdc++-v3/include/tr1/cmath (working copy) @@ -986,9 +986,6 @@ // DR 550. What should the return type of pow(float,int) be? // NB: C++0x and TR1 != C++03. - inline double - pow(double __x, double __y) - { return std::pow(__x, __y); } inline float pow(float __x, float __y)