This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: [RFA] (cli/cli-cmds.c) ARI fix: Avoid assignment inside if statement


  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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]