public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* bug in libstdc++ bitset
@ 2002-08-19  6:05 Ed Parcell
  2002-08-19  6:30 ` Andrew Pinski
  2002-08-19  7:57 ` Phil Edwards
  0 siblings, 2 replies; 3+ messages in thread
From: Ed Parcell @ 2002-08-19  6:05 UTC (permalink / raw)
  To: gcc

Hi,

Sorry that this is almost definitely the wrong place to send this to.
Anyway, here goes. bitset::none() and bitset::any() appear to only look
at the first word. Here is example code to exhibit this:

#include <bitset>
#include <iostream>

void main() {
        bitset <33> b;
        b.set(32); 
        cout << b << ' ' << b.count() << ' ' << b.none() << '\n';
}

I am using libstdc++ in the debian package libstdc++2.10, which has the
description "This is not a final release, but taken from the CVS
gcc-2_95-branch
 (dated 2001-10-02)". This bug also occurs on libstdc++3-3.0.1-3 I
believe.

Thanks,
        Ed.


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: bug in libstdc++ bitset
  2002-08-19  6:05 bug in libstdc++ bitset Ed Parcell
@ 2002-08-19  6:30 ` Andrew Pinski
  2002-08-19  7:57 ` Phil Edwards
  1 sibling, 0 replies; 3+ messages in thread
From: Andrew Pinski @ 2002-08-19  6:30 UTC (permalink / raw)
  To: Ed Parcell; +Cc: gcc

After changing it to let it compile under 3.x,
#include <bitset>
#include <iostream>
using namespace std;

int main() {
        bitset <33> b;
        b.set(32);
        cout << b << ' ' << b.count() << ' ' << b.none() << '\n';
}

With the current cvs, it compiles fine and outputs:
100000000000000000000000000000000 1 0

which looks to be the right answer.

Thanks,
Andrew Pinski

On Monday, August 19, 2002, at 09:05 , Ed Parcell wrote:

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: bug in libstdc++ bitset
  2002-08-19  6:05 bug in libstdc++ bitset Ed Parcell
  2002-08-19  6:30 ` Andrew Pinski
@ 2002-08-19  7:57 ` Phil Edwards
  1 sibling, 0 replies; 3+ messages in thread
From: Phil Edwards @ 2002-08-19  7:57 UTC (permalink / raw)
  To: Ed Parcell; +Cc: gcc

On Mon, Aug 19, 2002 at 02:05:12PM +0100, Ed Parcell wrote:
> Hi,
> 
> Sorry that this is almost definitely the wrong place to send this to.

http://gcc.gnu.org/lists.html

> I am using libstdc++ in the debian package libstdc++2.10, which has the
> description "This is not a final release, but taken from the CVS
> gcc-2_95-branch
>  (dated 2001-10-02)".

The 2.x series hasn't been maintained in quite some time.  The 3.x library
is a complete rewrite.


Phil

-- 
I would therefore like to posit that computing's central challenge, viz. "How
not to make a mess of it," has /not/ been met.
                                                 - Edsger Dijkstra, 1930-2002

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2002-08-19  7:57 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-08-19  6:05 bug in libstdc++ bitset Ed Parcell
2002-08-19  6:30 ` Andrew Pinski
2002-08-19  7:57 ` Phil Edwards

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).