This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: HP/SGI g++ 2.95.2 valarray bug
- To: Mihir Arjunwadkar <mihir at stat dot cmu dot edu>
- Subject: Re: HP/SGI g++ 2.95.2 valarray bug
- From: llewelly at dbritsch dot dsl dot xmission dot com
- Date: Fri, 5 May 2000 15:07:19 -0600 (MDT)
- Cc: gcc-bugs at gcc dot gnu dot org
[snip]
> Description of the problem
> The g++ 2.95.2 valarray class seems to violate part of
> the specifications for one of its constructors:
>
> explicit valarray(size_t);
>
> 1 The array created by this constructor has a length equal to the value
> of the argument. The elements of the array are constructed using the
> default constructor for the instantiating type T.
>
> ( The text quoted above is from the Dec 1996 working paper;
> Straustrup::The_C++_Programming_Language( edition = 3, page = 662 )
> has the same specifications ).
>
> The g++ 2.95.2 implementation of this constructor does not
> seem to initialize the elements with the default value,
> as demonstrated by the example source code below. The problem
> shows up second iteration onwards.
>
[snip]
Thank you for your bug report.
This bug is fixed in libstdc++-v3, which will probably be the standard
c++ library for the next major release of gcc .