From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26291 invoked by alias); 22 Jun 2009 11:37:47 -0000 Received: (qmail 26282 invoked by uid 22791); 22 Jun 2009 11:37:47 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL,BAYES_00,SARE_MSGID_LONG40,SPF_PASS X-Spam-Check-By: sourceware.org Received: from qw-out-1920.google.com (HELO qw-out-1920.google.com) (74.125.92.147) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 22 Jun 2009 11:37:38 +0000 Received: by qw-out-1920.google.com with SMTP id 4so1522962qwk.14 for ; Mon, 22 Jun 2009 04:37:36 -0700 (PDT) MIME-Version: 1.0 Received: by 10.220.90.199 with SMTP id j7mr3523185vcm.57.1245670655984; Mon, 22 Jun 2009 04:37:35 -0700 (PDT) In-Reply-To: <4A3F6ED1.6020106@gmail.com> References: <4A3CF81C.7050406@redhat.com> <4aca3dc20906211944hb27a3day21bc22c8a9f58aee@mail.gmail.com> <4A3F6ED1.6020106@gmail.com> Date: Mon, 22 Jun 2009 11:37:00 -0000 Message-ID: <84fc9c000906220437t2d6fcb8fx6a59a45b7ed49abd@mail.gmail.com> Subject: Re: (known?) Issue with bitmap iterators From: Richard Guenther To: Dave Korn Cc: Daniel Berlin , Jeff Law , GCC Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org X-SW-Source: 2009-06/txt/msg00504.txt.bz2 On Mon, Jun 22, 2009 at 1:45 PM, Dave Korn wrote: > Daniel Berlin wrote: > >> Also, what do you expect the semantics to be? > > =A0Since we don't expect an iterator to return the same bit twice when > iterating in any case, the ideal would be that it shouldn't matter what > happens to bits that the iterator has already passed. > >> In particular, are new bits past the current index iterated over, or >> do you expect to iterate over the bitmap as it existed at the time you >> started iteration? > > =A0That would be an ecumenical matter! =A0Err, I mean ... maybe the best = solution > (particularly in terms of preventing future bugs) would be for opening an > iterator to put the bitmap into a read-only mode that causes bitmap_clear= _bit > or bitmap_set_bit to fail, and that automatically clears when the iterator > runs off the end? Heh, that sounds useful. Keep bitmaps forced readonly during iterating over them but be able to actually verify it. Might need some new exit-from-iterating magic though. Richard. > > =A0 =A0cheers, > =A0 =A0 =A0DaveK > >