[RFC] logic change in m2-valprint.c

Daniel Jacobowitz drow@false.org
Tue Jul 3 01:12:00 GMT 2007


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



More information about the Gdb-patches mailing list