From: Joel Brobecker <brobecker@adacore.com>
To: Pierre Muller <muller@ics.u-strasbg.fr>
Cc: gdb-patches@sourceware.org
Subject: Re: [Obvious] ARI fixes: OP eol rules files starting with d, e or f
Date: Wed, 07 Oct 2009 16:18:00 -0000 [thread overview]
Message-ID: <20091007161820.GN5689@adacore.com> (raw)
In-Reply-To: <000001ca46dd$09a7a960$1cf6fc20$@u-strasbg.fr>
> 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
prev parent reply other threads:[~2009-10-07 16:18 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-06 23:30 Pierre Muller
2009-10-07 16:18 ` Joel Brobecker [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20091007161820.GN5689@adacore.com \
--to=brobecker@adacore.com \
--cc=gdb-patches@sourceware.org \
--cc=muller@ics.u-strasbg.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox