This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFA] (cli/cli-cmds.c) ARI fix: Avoid assignment inside if statement
- From: Eli Zaretskii <eliz at gnu dot org>
- To: Andreas Schwab <schwab at linux-m68k dot org>
- Cc: pierre dot muller at ics-cnrs dot unistra dot fr, gdb-patches at sourceware dot org
- Date: Mon, 24 Dec 2012 05:41:11 +0200
- Subject: Re: [RFA] (cli/cli-cmds.c) ARI fix: Avoid assignment inside if statement
- References: <001201cde13f$af3ad4b0$0db07e10$%muller@ics-cnrs.unistra.fr> <837go8pnxn.fsf@gnu.org> <m2vcbsl7xe.fsf@igel.home>
- Reply-to: Eli Zaretskii <eliz at gnu dot org>
> 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.