From 922a45e8c80d9c15acdba0eee3d03681cc7cb8d6 Mon Sep 17 00:00:00 2001 From: obrien Date: Thu, 9 Mar 2000 09:21:46 +0000 Subject: Bring in bug fixes from the GCC anoncvs server's "gcc-2_95-branch" branch as of March 7th, 2000. --- contrib/libstdc++/ChangeLog | 23 ++++++++++++++++++++++- contrib/libstdc++/std/complext.cc | 2 +- contrib/libstdc++/std/valarray_array.h | 2 +- contrib/libstdc++/std/valarray_meta.h | 7 ++++--- 4 files changed, 28 insertions(+), 6 deletions(-) (limited to 'contrib/libstdc++') diff --git a/contrib/libstdc++/ChangeLog b/contrib/libstdc++/ChangeLog index fe52ab7..18e557a 100644 --- a/contrib/libstdc++/ChangeLog +++ b/contrib/libstdc++/ChangeLog @@ -1,5 +1,26 @@ -1999-12-14 Martin v. Löwis +Tue Mar 7 21:37:56 2000 Jeffrey A Law (law@cygnus.com) + + 1999-11-19 Gabriel Dos Reis + * std/valarray_meta.h (_DEFINE_EXPR_UNARY_FUNCTION): Don't forget + to define tanh. + + 1999-11-05 Gabriel Dos Reis + * std/valarray_meta.h (_DEFINE_EXPR_UNARY_FUNCTION): When + building meta-expressions don't forget to take the contained + closures. + + 1999-10-19 Gabriel Dos Reis + * std/valarray_meta.h: (_BinClos::_BinClos): Fix typo. + 1999-09-17 Gabriel Dos Reis + * std/complext.cc (pow): Don't expect floating point promotion + in presence of template argument deduction. There is no such + thing. + +2000-02-06 Gabriel Dos Reis + * std/valarray_array.h (__valarray_copy): Fix typo. + +1999-12-14 Martin v. Löwis * std/bastring.h (basic_string::basic_string): Rename parameters to avoid shadow warnings. * std/bastring.cc (alloc): Likewise. diff --git a/contrib/libstdc++/std/complext.cc b/contrib/libstdc++/std/complext.cc index d50bf08..60227f2 100644 --- a/contrib/libstdc++/std/complext.cc +++ b/contrib/libstdc++/std/complext.cc @@ -236,7 +236,7 @@ pow (const complex& xin, int y) if (y < 0) { y = -y; - x = 1/x; + x = FLOAT(1)/x; } for (;;) { diff --git a/contrib/libstdc++/std/valarray_array.h b/contrib/libstdc++/std/valarray_array.h index f711e52..a0b5818 100644 --- a/contrib/libstdc++/std/valarray_array.h +++ b/contrib/libstdc++/std/valarray_array.h @@ -73,7 +73,7 @@ template inline void __valarray_copy (const _Tp* __restrict__ __a, size_t __n, size_t __s, _Tp* __restrict__ __b) -{ for (size_t __i=0; __i<__n; ++__i, ++__b, __a += __s) *__b += *__a; } +{ for (size_t __i=0; __i<__n; ++__i, ++__b, __a += __s) *__b = *__a; } // copy plain __a[<__n>] in strided __b[<__n : __s>] template diff --git a/contrib/libstdc++/std/valarray_meta.h b/contrib/libstdc++/std/valarray_meta.h index f799111..48fb213 100644 --- a/contrib/libstdc++/std/valarray_meta.h +++ b/contrib/libstdc++/std/valarray_meta.h @@ -449,7 +449,7 @@ struct _BinClos<_Oper,_ValArray,_Expr,typename _Dom::value_type,_Dom> typedef _BinBase<_Oper,valarray<_Tp>,_Dom> _Base; typedef typename _Base::value_type value_type; - _BinClos (const valarray<_Tp> __e1, const _Dom& __e2) + _BinClos (const valarray<_Tp>& __e1, const _Dom& __e2) : _Base (__e1, __e2) {} }; @@ -917,7 +917,7 @@ _Name(const _Expr<_Dom,typename _Dom::value_type>& __e) \ { \ typedef typename _Dom::value_type _Tp; \ typedef _UnFunClos<_Expr,_Dom> _Closure; \ - return _Expr<_Closure,_Tp> (_Closure (__e, (_Tp(*)(_Tp))(&_Name))); \ + return _Expr<_Closure,_Tp>(_Closure(__e(), (_Tp(*)(_Tp))(&_Name))); \ } \ \ template \ @@ -936,7 +936,8 @@ _Name(const valarray<_Tp>& __v) \ _DEFINE_EXPR_UNARY_FUNCTION(sin) _DEFINE_EXPR_UNARY_FUNCTION(asin) _DEFINE_EXPR_UNARY_FUNCTION(sinh) - _DEFINE_EXPR_UNARY_FUNCTION(tan) + _DEFINE_EXPR_UNARY_FUNCTION(tan) + _DEFINE_EXPR_UNARY_FUNCTION(tanh) _DEFINE_EXPR_UNARY_FUNCTION(atan) _DEFINE_EXPR_UNARY_FUNCTION(exp) _DEFINE_EXPR_UNARY_FUNCTION(log) -- cgit v1.1