This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH v2] gdb/i387-tdep.c: Avoid warning for "-Werror=strict-overflow"
- From: Mark Kettenis <mark dot kettenis at xs4all dot nl>
- To: brobecker at adacore dot com
- Cc: gang dot chen dot 5i5j at gmail dot com, gdb-patches at sourceware dot org, palves at redhat dot com
- Date: Wed, 15 Oct 2014 20:58:59 +0200 (CEST)
- Subject: Re: [PATCH v2] gdb/i387-tdep.c: Avoid warning for "-Werror=strict-overflow"
- Authentication-results: sourceware.org; auth=none
- References: <543A8208 dot 9060605 at gmail dot com> <201410131516 dot s9DFGPh9005236 at glazunov dot sibelius dot xs4all dot nl> <543BF857 dot 9080805 at gmail dot com> <20141015184711 dot GF25846 at adacore dot com>
> Date: Wed, 15 Oct 2014 11:47:11 -0700
> From: Joel Brobecker <brobecker@adacore.com>
>
> 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.
Pedro's suggestion made sense to me.