From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16413 invoked by alias); 7 Oct 2009 16:18:35 -0000 Received: (qmail 16405 invoked by uid 22791); 7 Oct 2009 16:18:34 -0000 X-SWARE-Spam-Status: No, hits=-2.4 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; Wed, 07 Oct 2009 16:18:29 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id D90752BABBD; Wed, 7 Oct 2009 12:18:27 -0400 (EDT) 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 uBHNtWDExSdo; Wed, 7 Oct 2009 12:18:27 -0400 (EDT) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id 208FE2BABB8; Wed, 7 Oct 2009 12:18:26 -0400 (EDT) Received: by joel.gnat.com (Postfix, from userid 1000) id 63447F589F; Wed, 7 Oct 2009 09:18:20 -0700 (PDT) Date: Wed, 07 Oct 2009 16:18:00 -0000 From: Joel Brobecker To: Pierre Muller Cc: gdb-patches@sourceware.org Subject: Re: [Obvious] ARI fixes: OP eol rules files starting with d, e or f Message-ID: <20091007161820.GN5689@adacore.com> References: <000001ca46dd$09a7a960$1cf6fc20$@u-strasbg.fr> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <000001ca46dd$09a7a960$1cf6fc20$@u-strasbg.fr> User-Agent: Mutt/1.5.18 (2008-05-17) 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-10/txt/msg00151.txt.bz2 > PS: The dwarf_decode_macros code still is a bit "non-conformant" as > lines stop with "?" with his also an operator, no? But these are not > yet listed as errors by the ARI script, should it? If yet, how should > the "clean" code look like? (I'm not a big fan of the "?" operator, even if I see how it can be convenient). The GNU Coding Standards confirm that we should split before the "?" operator. I initially had no preference wrt the ARI, but since the GCS shows examples involving that operator, I guess we should add a rule for it. How it should look: complaint (&symfile_complaints, _("debug info with no main source gives macro %s " "on line %d: %s"), macinfo_type == DW_MACINFO_define ? _("definition") : macinfo_type == DW_MACINFO_undef ? _("undefinition") : _("something-or-other"), line, body); Honestly, it seems to me that a local variable and if statements will make the code more readable than it is right now. Other, I believe the formatting that the GCS recommends the use of extra parents in order to help tools such as emacs. So I propose the following formatting: complaint (&symfile_complaints, _("debug info with no main source gives macro %s " "on line %d: %s"), (macinfo_type == DW_MACINFO_define ? _("definition") : (macinfo_type == DW_MACINFO_undef ? _("undefinition") : _("something-or-other"))), line, body); My 2 cents... -- Joel