This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: (known?) Issue with bitmap iterators


Daniel Berlin wrote:

> Also, what do you expect the semantics to be?

  Since 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?

  That would be an ecumenical matter!  Err, 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?

    cheers,
      DaveK


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