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: [RFC] logic change in m2-valprint.c


On Thu, Jun 28, 2007 at 05:29:55PM -0700, Michael Snyder wrote:
> I'm really not sure about this, call it a shot in the dark.
> 
> The logic doesn't make sense as it is (the condition can't be true),
> so I figured maybe the conditional had been reversed by mistake.
> 
> Either that, or the two lines should be removed, 'cause they're dead.
> 

> 2007-06-28  Michael Snyder  <msnyder@access-company.com>
> 
> 	* m2-valprint.c (m2_print_long_set): Logical condition reversed
> 	(Coverity).

It can't be backwards; this is trying to print "1" or "1, 2" but your
change would make it print ", 1" and ", 12".

I think it's also trying to shorten ranges to "{1..3, 6..7}".  The
bug's got to be in there somewhere.  Why's the code dead?  I'm not
seeing it... element_seen can be reset by the bit clear case, and then
we'll get into the test you're changing again.


-- 
Daniel Jacobowitz
CodeSourcery


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