Re: [PATCH 1/2] PR77822

2016-11-18 Thread Dominik Vogt
On Fri, Nov 18, 2016 at 08:02:08AM -0600, Segher Boessenkool wrote: > On Fri, Nov 18, 2016 at 01:09:24PM +0100, Dominik Vogt wrote: > > IN_RANGE(POS...) makes sure that POS is a non-negative number > > smaller than UPPER, so (UPPER) - (POS) does not wrap. Or is there > > some case that the new mac

Re: [PATCH 1/2] PR77822

2016-11-18 Thread Segher Boessenkool
On Fri, Nov 18, 2016 at 01:09:24PM +0100, Dominik Vogt wrote: > How about this: > > -- > /* A convenience macro to determine whether a SIZE lies inclusively >within [1, UPPER], POS lies inclusively within between >[0, UPPER - 1] and the sum lies inclusively within [1, UPPER]. >UPPER mu

Re: [PATCH 1/2] PR77822

2016-11-18 Thread Dominik Vogt
On Fri, Nov 18, 2016 at 03:31:40AM -0600, Segher Boessenkool wrote: > Hi Dominik, > > On Thu, Nov 17, 2016 at 04:53:47PM +0100, Dominik Vogt wrote: > > +/* A convenience macro to determine whether a SIZE lies inclusively > > + within [1, RANGE], POS lies inclusively within between > > + [0, RA

Re: [PATCH 1/2] PR77822

2016-11-18 Thread Segher Boessenkool
Hi Dominik, On Thu, Nov 17, 2016 at 04:53:47PM +0100, Dominik Vogt wrote: > +/* A convenience macro to determine whether a SIZE lies inclusively > + within [1, RANGE], POS lies inclusively within between > + [0, RANGE - 1] and the sum lies inclusively within [1, RANGE]. */ > +#define SIZE_POS

Re: [PATCH 1/2] PR77822

2016-11-17 Thread Dominik Vogt
On Thu, Nov 17, 2016 at 04:53:03PM +0100, Dominik Vogt wrote: > The following two patches fix PR 77822 on s390x for gcc-7. As the > macro doing the argument range checks can be used on other targets > as well, I've put it in system.h (couldn't think of a better > place; maybe rtl.h?). > > Bootstr