[C++ Patch] for c++/54537
Paolo Carlini
paolo.carlini@oracle.com
Tue Sep 18 18:00:00 GMT 2012
Hi,
"Fabien Chêne" <fabien.chene@gmail.com> ha scritto:
>2012/9/11 Fabien Chêne <fabien.chene@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); }
>}
>}
I don't understand: what's wrong - exactly - with the std::tr1::pow (double, double) overload above? Now I can't immediately check, but do the EDG and CLANG front ends accept it or not?
Paolo
More information about the Libstdc++
mailing list