Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: "Pierre Muller" <pierre.muller@ics-cnrs.unistra.fr>
To: "'Eli Zaretskii'" <eliz@gnu.org>,
	       "'Andreas Schwab'" <schwab@linux-m68k.org>
Cc: <gdb-patches@sourceware.org>
Subject: RE: [RFA] (cli/cli-cmds.c) ARI fix: Avoid assignment inside if statement
Date: Thu, 10 Jan 2013 12:28:00 -0000	[thread overview]
Message-ID: <000901cdef2d$dd0f32e0$972d98a0$@muller@ics-cnrs.unistra.fr> (raw)
In-Reply-To: <834njcp160.fsf@gnu.org>

  Hi all,

   I would like to know what the status of this patch is,
and more generally of the ARI rule: "Avoid assignment inside if statement".

  Eli wanted to challenge this rule,
but others seems to be in favor...

  I really do find code easier to read if assignments are done
before the if statement, but this is due to my pascal background,
which forbids it.

 
  Pierre Muller,
as ARI maintainer.
  


> -----Message d'origine-----
> De : gdb-patches-owner@sourceware.org [mailto:gdb-patches-
> owner@sourceware.org] De la part de Eli Zaretskii
> Envoyé : lundi 24 décembre 2012 04:41
> À : Andreas Schwab
> Cc : pierre.muller@ics-cnrs.unistra.fr; gdb-patches@sourceware.org
> Objet : Re: [RFA] (cli/cli-cmds.c) ARI fix: Avoid assignment inside if
> statement
> 
> > From: Andreas Schwab <schwab@linux-m68k.org>
> > Cc: Pierre Muller <pierre.muller@ics-cnrs.unistra.fr>,  gdb-
> patches@sourceware.org
> > Date: Sun, 23 Dec 2012 23:28:45 +0100
> >
> > Eli Zaretskii <eliz@gnu.org> writes:
> >
> > > Since when is that bad C, so much so that we would need to enforce it?
> >
> > It's part of the GNU coding standards.
> 
> Which says "Try not to...".
> 
> FWIW, Emacs sources are replete with such assignments, and I don't see
> anything wrong with that in the first place.
> 
> So yes, I guess I'm challenging this ARI rule.


  parent reply	other threads:[~2013-01-10 12:28 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <001201cde13f$af3ad4b0$0db07e10$%muller@ics-cnrs.unistra.fr>
2012-12-23 19:29 ` Eli Zaretskii
2012-12-23 21:58   ` Pierre Muller
2012-12-23 22:28   ` Sergio Durigan Junior
2012-12-24  4:11     ` Joel Brobecker
2012-12-23 22:28   ` Andreas Schwab
2012-12-24  3:41     ` Eli Zaretskii
2012-12-24 10:17       ` Andreas Schwab
2013-01-10 12:28       ` Pierre Muller [this message]
2013-01-11  4:29         ` Joel Brobecker
2012-12-23 19:00 Pierre Muller
2012-12-24  4:17 ` Joel Brobecker
2012-12-24 10:22   ` Andreas Schwab

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='000901cdef2d$dd0f32e0$972d98a0$@muller@ics-cnrs.unistra.fr' \
    --to=pierre.muller@ics-cnrs.unistra.fr \
    --cc=eliz@gnu.org \
    --cc=gdb-patches@sourceware.org \
    --cc=schwab@linux-m68k.org \
    /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