From: Paolo Carlini Date: Tue, 15 Mar 2005 23:38:54 +0000 (+0000) Subject: re PR libstdc++/20352 (FAIL: 26_numerics/complex/pow.cc execution test) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b0de85997de6e241995d4bea75e62e5f7dd438b9;p=gcc.git re PR libstdc++/20352 (FAIL: 26_numerics/complex/pow.cc execution test) 2005-03-15 Paolo Carlini PR libstdc++/20352 * include/std/std_complex.h (pow(const complex<_Tp>&, const _Tp&)): On non-c99 platforms, don't try to compute log of complex zero. From-SVN: r96538 --- diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index bfda25db058..20544556679 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,10 @@ +2005-03-15 Paolo Carlini + + PR libstdc++/20352 + * include/std/std_complex.h (pow(const complex<_Tp>&, + const _Tp&)): On non-c99 platforms, don't try to compute + log of complex zero. + 2005-03-10 Ben Elliston * testsuite/22_locale/locale/cons/12658_thread-1.cc: Don't XFAIL diff --git a/libstdc++-v3/include/std/std_complex.h b/libstdc++-v3/include/std/std_complex.h index 694acdc41c9..6c1e0033730 100644 --- a/libstdc++-v3/include/std/std_complex.h +++ b/libstdc++-v3/include/std/std_complex.h @@ -944,6 +944,10 @@ namespace std complex<_Tp> pow(const complex<_Tp>& __x, const _Tp& __y) { +#ifndef _GLIBCXX_USE_C99_COMPLEX + if (__x == _Tp()) + return _Tp(); +#endif if (__x.imag() == _Tp() && __x.real() > _Tp()) return pow(__x.real(), __y);