This is the mail archive of the libstdc++-prs@sourceware.cygnus.com mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

libstdc++/40: bitset::operator<<= and >>= incorrect for multiples of 32



>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:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]