This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] rs6000: Fix signed integer overflows
- From: Segher Boessenkool <segher at kernel dot crashing dot org>
- To: Marek Polacek <polacek at redhat dot com>
- Cc: Markus Trippelsdorf <markus at trippelsdorf dot de>, gcc-patches at gcc dot gnu dot org, David Edelsohn <dje dot gcc at gmail dot com>
- Date: Wed, 19 Nov 2014 09:59:19 -0600
- Subject: Re: [PATCH] rs6000: Fix signed integer overflows
- Authentication-results: sourceware.org; auth=none
- References: <20141119152425 dot GG344 at x4> <20141119154149 dot GD29446 at redhat dot com>
On Wed, Nov 19, 2014 at 04:41:49PM +0100, Marek Polacek wrote:
> > - HOST_WIDE_INT c, lsb;
> > + unsigned HOST_WIDE_INT c, lsb;
> >
> > c = INTVAL (op);
>
> Shouldn't you use UINTVAL then?
That doesn't really matter here. It looks a bit cleaner, of course.
I wouldn't spend too much time on mask*operand, I'll replace them
wholesale if all plans fall in place...
Segher