This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB 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: [RFC] logic change in m2-valprint.c


On Mon, Jul 02, 2007 at 05:05:12PM -0700, Michael Snyder wrote:
> is nowhere else for it to be set false), and there is no second
> time -- we will never enter this block again because we will set
> "element_seen" to true (and there is nowhere else for it to be
> set false again).
> 
> Was that clear?

Clear, but not right.

    152                   element_seen = 0;

On entry, empty_set = 1 and element_seen = 0.  We see an element,
which causes us set empty_set = 0 and element_seen = 1.  Then we see a
clear bit in the set and set element_seen to 0 and not change
empty_set.  Then we see a set bit, and element_seen == 0 with
empty_set == 0.  We print the comma.

I would test it, but I don't have an M-2 compiler and the expression
parser can't create sets.  Am I missing something?

-- 
Daniel Jacobowitz
CodeSourcery


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