From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28992 invoked by alias); 18 Dec 2011 10:47:01 -0000 Received: (qmail 28978 invoked by uid 22791); 18 Dec 2011 10:47:00 -0000 X-SWARE-Spam-Status: No, hits=-2.0 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sun, 18 Dec 2011 10:46:47 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 55E232BAECE; Sun, 18 Dec 2011 05:46:47 -0500 (EST) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id EYLanSeiBgWd; Sun, 18 Dec 2011 05:46:47 -0500 (EST) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id 9CB822BAEC5; Sun, 18 Dec 2011 05:46:46 -0500 (EST) Received: by joel.gnat.com (Postfix, from userid 1000) id A7986145615; Sun, 18 Dec 2011 02:46:34 -0800 (PST) Date: Sun, 18 Dec 2011 11:38:00 -0000 From: Joel Brobecker To: Jan Kratochvil Cc: gdb-patches@sourceware.org Subject: Re: [patch] s390*: watchpoints regression [repost] Message-ID: <20111218104634.GJ21915@adacore.com> References: <20111217094753.GA20113@host2.jankratochvil.net> <20111217194454.GA15156@host2.jankratochvil.net> <201112171956.33037.alves.ped@gmail.com> <201112172012.57734.pedro@codesourcery.com> <20111218062127.GE21915@adacore.com> <20111218095850.GA19078@host2.jankratochvil.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20111218095850.GA19078@host2.jankratochvil.net> User-Agent: Mutt/1.5.20 (2009-06-14) 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: 2011-12/txt/msg00595.txt.bz2 > FYI I am aware of this rule and I try to follow it but it seems > unnatural to me. It then requires new { brackets } and when reading > the code I would more expect to see why the conditional happens, not > why the return happens. Interesting, the opposite feels completely unnatural to me: The comment only applies if the condition is true, whereas in the case I was quoting, it looks like it applies no matter what. Regarding the extra curly braces, I think it's OK to leave them out, like so: if ([...]) /* This is a comment that ... */ return; If we prefer keeping the comment before the condition, then I would suggest we rewrite the comment to say so. Something like this: /* If this is an old thread, or there is something else special to it, then it's ok to do nothing. */ if ([...]) return; -- Joel