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] Emit a warning for ineffective set VAR = EXP command


On Wed, 9 May 2012, Paul_Koning@Dell.com wrote:

> >> 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.
> > 
> > I don't know who should approve this adjustment, but here is the version that deals with pre/post inc/dec.
> > Note that it still warns for expressions such as i++ * 2.
> 
> If you had it walk through the elts[] list, would it then work for that case?

 What do you mean by "work" here?  I think a warning for "i++ * 2" is 
expected as that's questionable use -- the result of the multiplication is 
discarded.  Did you mean anything else?

 I can't approve this change, but it seems OK to me.

  Maciej


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