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: Joel Brobecker <brobecker at adacore dot com>
- To: Pierre Muller <pierre dot muller at ics-cnrs dot unistra dot fr>
- Cc: 'Eli Zaretskii' <eliz at gnu dot org>, 'Andreas Schwab' <schwab at linux-m68k dot org>, gdb-patches at sourceware dot org
- Date: Fri, 11 Jan 2013 08:29:31 +0400
- 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> <834njcp160.fsf@gnu.org> <000901cdef2d$dd0f32e0$972d98a0$@muller@ics-cnrs.unistra.fr>
> I would like to know what the status of this patch is,
> and more generally of the ARI rule: "Avoid assignment inside if statement".
I think that we should continue to discourage the use of assignments
inside if statements, and the ARI is a good tool for that. If someone
happens to come across a situation where it is clearly advantageous
to break this rule, then we can document it using an ARI comment
that clearly allows it.
--
Joel