This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFA] Emit a warning for ineffective set VAR = EXP command
- From: Joel Brobecker <brobecker at adacore dot com>
- To: Tristan Gingold <gingold at adacore dot com>
- Cc: "Maciej W. Rozycki" <macro at codesourcery dot com>, "gdb-patches at sourceware dot org ml" <gdb-patches at sourceware dot org>
- Date: Mon, 7 May 2012 12:38:24 -0700
- Subject: Re: [RFA] Emit a warning for ineffective set VAR = EXP command
- References: <8781499A-A489-42D0-80B1-75136331DBDB@adacore.com> <alpine.DEB.1.10.1205041958130.18334@tp.orcam.me.uk> <EFDD29C9-79FB-468E-B29B-C1783123E41D@adacore.com>
> > This warns about "set variable $j++" presumably -- should the warning be
> > disabled for pre/post increments/decrements?
>
> I am not opposed to disable warnings for pre/post inc/dec.
> But this usage is dubious (the help explicitly mentions VAR=EXP !)
>
> Opinion ?
I think we should avoid the warning for pre/post inc/dec. This
type of expression might be a little outside the method proposed
in our documentation, but I think it's still a perfectly valid
expression that results in an assignment being performed.
--
Joel