From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21968 invoked by alias); 3 Jul 2007 07:42:03 -0000 Received: (qmail 21960 invoked by uid 22791); 3 Jul 2007 07:42:02 -0000 X-Spam-Check-By: sourceware.org Received: from sibelius.xs4all.nl (HELO brahms.sibelius.xs4all.nl) (82.92.89.47) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 03 Jul 2007 07:41:58 +0000 Received: from brahms.sibelius.xs4all.nl (kettenis@localhost.sibelius.xs4all.nl [127.0.0.1]) by brahms.sibelius.xs4all.nl (8.14.0/8.14.0) with ESMTP id l637fieV027703; Tue, 3 Jul 2007 09:41:44 +0200 (CEST) Received: (from kettenis@localhost) by brahms.sibelius.xs4all.nl (8.14.0/8.14.0/Submit) id l637fhwb007184; Tue, 3 Jul 2007 09:41:43 +0200 (CEST) Date: Tue, 03 Jul 2007 07:42:00 -0000 Message-Id: <200707030741.l637fhwb007184@brahms.sibelius.xs4all.nl> From: Mark Kettenis To: drow@false.org CC: msnyder@sonic.net, gdb-patches@sourceware.org, gaius@glam.ac.uk In-reply-to: <20070703011147.GA26350@caradoc.them.org> (message from Daniel Jacobowitz on Mon, 2 Jul 2007 21:11:47 -0400) Subject: Re: [RFC] logic change in m2-valprint.c References: <16087.12.7.175.2.1183076995.squirrel@webmail.sonic.net> <20070701154831.GE10872@caradoc.them.org> <004a01c7bbf8$16a2ccc0$677ba8c0@sonic.net> <20070701160224.GH10872@caradoc.them.org> <9624.12.7.175.2.1183421112.squirrel@webmail.sonic.net> <20070703011147.GA26350@caradoc.them.org> Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2007-07/txt/msg00060.txt.bz2 > Date: Mon, 2 Jul 2007 21:11:47 -0400 > From: Daniel Jacobowitz > > 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? Dunno, but it is obvious that this bit of code is in need of a rewrite.