[PATCH v2] gdb/i387-tdep.c: Avoid warning for "-Werror=strict-overflow"

Joel Brobecker brobecker@adacore.com
Wed Oct 15 18:47:00 GMT 2014


Hi Mark,

> > Sorry, I disagree with this approach.  I think your compiler is really
> > being unhelpful here.  See if a newer GCC version of the compiler
> > still triggers that warning.  If so, complain to the GCC people.

Would you be OK with Pedro's suggested approach where we have
an additional macro that provides the number of ST registers?
That should get rid of the warning, and it seems like the code
might actually even be slightly better for it; it would make it
obvious that you iterate over a fixed number of registers, and
which ones you are interating over; [ST0 .. XMM0[ does not make
it as clear that the range only refers to ST registers, for instance.

-- 
Joel



More information about the Gdb-patches mailing list