From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26201 invoked by alias); 1 Jul 2007 15:49:05 -0000 Received: (qmail 26193 invoked by uid 22791); 1 Jul 2007 15:49:04 -0000 X-Spam-Check-By: sourceware.org Received: from NaN.false.org (HELO nan.false.org) (208.75.86.248) by sourceware.org (qpsmtpd/0.31) with ESMTP; Sun, 01 Jul 2007 15:49:03 +0000 Received: from nan.false.org (localhost [127.0.0.1]) by nan.false.org (Postfix) with ESMTP id DE31B982BB; Sun, 1 Jul 2007 15:49:01 +0000 (GMT) Received: from caradoc.them.org (22.svnf5.xdsl.nauticom.net [209.195.183.55]) by nan.false.org (Postfix) with ESMTP id 8BCEE982B8; Sun, 1 Jul 2007 15:49:01 +0000 (GMT) Received: from drow by caradoc.them.org with local (Exim 4.67) (envelope-from ) id 1I51f5-00033u-BL; Sun, 01 Jul 2007 11:48:31 -0400 Date: Sun, 01 Jul 2007 15:49:00 -0000 From: Daniel Jacobowitz To: msnyder@sonic.net Cc: gdb-patches@sourceware.org, gaius@glam.ac.uk Subject: Re: [RFC] logic change in m2-valprint.c Message-ID: <20070701154831.GE10872@caradoc.them.org> Mail-Followup-To: msnyder@sonic.net, gdb-patches@sourceware.org, gaius@glam.ac.uk References: <16087.12.7.175.2.1183076995.squirrel@webmail.sonic.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <16087.12.7.175.2.1183076995.squirrel@webmail.sonic.net> User-Agent: Mutt/1.5.15 (2007-04-09) X-IsSubscribed: yes 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/msg00008.txt.bz2 On Thu, Jun 28, 2007 at 05:29:55PM -0700, Michael Snyder wrote: > I'm really not sure about this, call it a shot in the dark. > > The logic doesn't make sense as it is (the condition can't be true), > so I figured maybe the conditional had been reversed by mistake. > > Either that, or the two lines should be removed, 'cause they're dead. > > 2007-06-28 Michael Snyder > > * m2-valprint.c (m2_print_long_set): Logical condition reversed > (Coverity). It can't be backwards; this is trying to print "1" or "1, 2" but your change would make it print ", 1" and ", 12". I think it's also trying to shorten ranges to "{1..3, 6..7}". The bug's got to be in there somewhere. Why's the code dead? I'm not seeing it... element_seen can be reset by the bit clear case, and then we'll get into the test you're changing again. -- Daniel Jacobowitz CodeSourcery