From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10049 invoked by alias); 22 Jun 2009 18:35:36 -0000 Received: (qmail 10041 invoked by uid 22791); 22 Jun 2009 18:35:35 -0000 X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mx2.redhat.com (HELO mx2.redhat.com) (66.187.237.31) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 22 Jun 2009 18:35:30 +0000 Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id n5MIZTw7015322 for ; Mon, 22 Jun 2009 14:35:29 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx2.corp.redhat.com (8.13.1/8.13.1) with ESMTP id n5MIZSD3008395; Mon, 22 Jun 2009 14:35:28 -0400 Received: from host0.dyn.jankratochvil.net (sebastian-int.corp.redhat.com [172.16.52.221]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id n5MIZQPe032415; Mon, 22 Jun 2009 14:35:27 -0400 Received: from host0.dyn.jankratochvil.net (localhost [127.0.0.1]) by host0.dyn.jankratochvil.net (8.14.3/8.14.3) with ESMTP id n5MIZQcF032490; Mon, 22 Jun 2009 20:35:26 +0200 Received: (from jkratoch@localhost) by host0.dyn.jankratochvil.net (8.14.3/8.14.3/Submit) id n5MIZQpb032489; Mon, 22 Jun 2009 20:35:26 +0200 Date: Mon, 22 Jun 2009 18:35:00 -0000 From: Jan Kratochvil To: Tom Tromey Cc: gdb-patches@sourceware.org Subject: Re: [patch] Accelerate blocks sorting Message-ID: <20090622183526.GA31281@host0.dyn.jankratochvil.net> References: <20090622173856.GA6649@host0.dyn.jankratochvil.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.19 (2009-01-05) 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: 2009-06/txt/msg00574.txt.bz2 On Mon, 22 Jun 2009 20:26:26 +0200, Tom Tromey wrote: > This is also http://sourceware.org/bugzilla/show_bug.cgi?id=9988 Forgot to search for it again, sorry. > Jan> + return (BLOCK_START (b) > BLOCK_START (a)) > Jan> + - (BLOCK_START (b) < BLOCK_START (a)); > > This expression needs parens around it, according to GNU rules. GNU Coding Standards provides this sample code line: return ++x + bar (); Moreover it has no sample code (and found no rules) with `return' using parens. GDB uses `return' with parens a lot but I find it a GNU style violation by GDB fixing it along in the patches. Sure no problem to change it but is there any backing for such parens? > I think you don't actually need a cleanup here, as nothing here can > call error. However, if you want to leave it, that is also ok with > me. I did not notice, still I find the code safer that way. Thanks, Jan