This is the mail archive of the
libstdc++-prs@sourceware.cygnus.com
mailing list for the libstdc++ project.
Re: libstdc++/40: bitset::operator<<= and >>= incorrect for multiplesof 32
- To: nobody at sourceware dot cygnus dot com
- Subject: Re: libstdc++/40: bitset::operator<<= and >>= incorrect for multiplesof 32
- From: Benjamin Kosnik <bkoz at cygnus dot com>
- Date: 10 Mar 2000 19:27:00 -0000
- Cc: libstdc++-prs at sourceware dot cygnus dot com,
- Reply-To: Benjamin Kosnik <bkoz at cygnus dot com>
The following reply was made to PR libstdc++/40; it has been noted by GNATS.
From: Benjamin Kosnik <bkoz@cygnus.com>
To: anders@ieee.org
Cc: libstdc++-gnats@sourceware.cygnus.com, libstdc++-prs@sourceware.cygnus.com
Subject: Re: libstdc++/40: bitset::operator<<= and >>= incorrect for multiples
of 32
Date: Fri, 10 Mar 2000 11:17:48 -0800 (PST)
can you please send me a patch and change log entry?
thanks,
benjamin
On 10 Mar 2000 anders@ieee.org wrote:
>
> >Number: 40
> >Category: libstdc++
> >Synopsis: bitset::operator<<= and >>= incorrect for multiples of 32
> >Confidential: no
> >Severity: serious
> >Priority: medium
> >Responsible: unassigned
> >State: open
> >Class: sw-bug
> >Submitter-Id: net
> >Arrival-Date: Thu Mar 09 20:57:00 PST 2000
> >Closed-Date:
> >Last-Modified:
> >Originator: Anders Johnson
> >Release: libstdc++-2.90.7
> >Organization:
> >Environment:
> SunOS thresher 5.6 Generic_105181-05 sun4u sparc SUMW,Ultra-60
> >Description:
> The implementation of bitset relies on the behavior
> of _WordT >> __BITS_PER_WORDT(_WordT), which is not
> defined according to the C standard, and is equivalent
> to _WordT >> 0 on the Sparc. This occurs whenever the
> shift amount is a multiple of __BITS_PER_WORDT(_WordT).
> >How-To-Repeat:
>
> >Fix:
> The expressions on lines 201 and 220 of stl/bits/std_bitset.h
> should read (__offset ? ... : static_cast<_WordT>(0)) instead.
> >Release-Note:
> >Audit-Trail:
> >Unformatted:
>