2012/9/11 Fabien Chêne <fabien.ch...@gmail.com>: > Oops, not sure how I test that change initially, or I must be blind, > because it triggers an error in tr1/cmath about pow. I'll see what I > can do...
Well, as summarized in the code below, the problem seems to be the redundant overload of std::tr1::pow(double,double). As one can note that std::pow(double,double) is not defined, I guess the right fix would consist in removing the definition of std::tr1::pow(double,double). extern double pow (double __x, double __y) throw (); namespace std { using ::pow; inline float pow(float __x, float __y) { return __builtin_powf(__x, __y); } inline long double pow(long double __x, long double __y) { return __builtin_powl(__x, __y); } } namespace std { namespace tr1 { // inline double // pow(double __x, double __y) // { return std::pow(__x, __y); } inline float pow(float __x, float __y) { return std::pow(__x, __y); } inline long double pow(long double __x, long double __y) { return std::pow(__x, __y); } } } While looking into this problem, I found it bothering not to have the conflicting declaration mentioned. Hence, I have modified the original patch to call diagnose_name_conflict in case of error. Bootstrapped/Tested x86_64-unknown-linux-gnu. 2012-09-18 Fabien Chêne <fab...@gcc.gnu.org> PR c++/54537 * cp-tree.h: Check OVL_USED with OVERLOAD_CHECK. * name-lookup.c (do_nonmember_using_decl): Make sure we have an OVERLOAD before calling OVL_USED. Call diagnose_name_conflict instead of issuing an error without mentioning the conflicting declaration. 2012-09-18 Fabien Chêne <fab...@gcc.gnu.org> PR c++/54537 * g++.dg/overload/using3.C: New. * g++.dg/overload/using2.C: Adjust. * g++.dg/lookup/using9.C: Likewise. 2012-09-18 Fabien Chêne <fab...@gcc.gnu.org> PR c++/54537 * include/tr1/cmath: Remove pow(double,double) overload. -- Fabien