From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4199 invoked by alias); 8 Apr 2002 11:16:07 -0000 Mailing-List: contact gcc-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-prs-owner@gcc.gnu.org Received: (qmail 4125 invoked by uid 71); 8 Apr 2002 11:16:06 -0000 Date: Mon, 08 Apr 2002 04:16:00 -0000 Message-ID: <20020408111606.4120.qmail@sources.redhat.com> To: gdr@gcc.gnu.org Cc: gcc-prs@gcc.gnu.org, From: Gabriel Dos Reis Subject: Re: libstdc++/6090: Problem with copy of std_valarray Reply-To: Gabriel Dos Reis X-SW-Source: 2002-04/txt/msg00475.txt.bz2 List-Id: The following reply was made to PR libstdc++/6090; it has been noted by GNATS. From: Gabriel Dos Reis To: bkoz@gcc.gnu.org Cc: erwan.goasdoue@ipsis.fr, gcc-bugs@gcc.gnu.org, gdr@gcc.gnu.org, gcc-gnats@gcc.gnu.org Subject: Re: libstdc++/6090: Problem with copy of std_valarray Date: 08 Apr 2002 13:06:42 +0200 bkoz@gcc.gnu.org writes: | Synopsis: Problem with copy of std_valarray | | State-Changed-From-To: feedback->analyzed | State-Changed-By: bkoz | State-Changed-When: Wed Apr 3 12:45:33 2002 | State-Changed-Why: | This looks like it is still an issue in gcc-3.1. | | include/std/std_valarray.h: 342 | | template | inline valarray<_Tp>& | valarray<_Tp>::operator= (const valarray<_Tp>& __v) | { | __valarray_copy(__v._M_data, _M_size, _M_data); | return *this; | } | | include/std/std_valarray.h: 284 | template | inline valarray<_Tp>::valarray (const valarray<_Tp>& __v) | : _M_size(__v._M_size), _M_data(__valarray_get_storage<_Tp>(__v._M_size)) | { __valarray_copy_construct (__v._M_data, __v._M_data + _M_size, _M_data); } I'm not sure I understand what the problem is about. Is the submitter complaining that copying a valarray wasn't adjusting the target's size? That is the mandated behaviour, in particular if the source and the target don't have the same length then the behaviour is undefined. -- Gaby