HP/SGI g++ 2.95.2 valarray bug
llewelly@dbritsch.dsl.xmission.com
llewelly@dbritsch.dsl.xmission.com
Fri May 5 14:07:00 GMT 2000
[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 .
More information about the Gcc-bugs
mailing list