Re: About issue 0001108 and abs(INT_MIN)

2018-07-23 Thread Vincent Lefevre
On 2018-07-23 20:24:11 +0700, Robert Elz wrote: > Date:Mon, 23 Jul 2018 15:13:21 +0200 > From:Vincent Lefevre > Message-ID: <20180723131321.gb12...@zira.vinc17.org> > > | No, this is not impossible. The result of the test is 0. > > Yes, I know, what I meant was

Re: About issue 0001108 and abs(INT_MIN)

2018-07-23 Thread Vincent Lefevre
On 2018-07-23 20:04:21 +0700, Robert Elz wrote: > Date:Mon, 23 Jul 2018 14:48:36 +0200 > From:Vincent Lefevre > Message-ID: <20180723124836.ga12...@zira.vinc17.org> > > | For the signness, one can just do: (T) -1 < 0 > > Until the brain dead compilers started

Re: About issue 0001108 and abs(INT_MIN)

2018-07-23 Thread Robert Elz
Date:Mon, 23 Jul 2018 14:48:36 +0200 From:Vincent Lefevre Message-ID: <20180723124836.ga12...@zira.vinc17.org> | For the signness, one can just do: (T) -1 < 0 Until the brain dead compilers started bitching about comparing an unsigned number for < 0 (which is

Re: About issue 0001108 and abs(INT_MIN)

2018-07-23 Thread Joerg Schilling
Vincent Lefevre wrote: > On 2018-07-23 08:06:46 +, Schwarz, Konrad wrote: > > I don't think such code (to detect whether an arbitrary type is > > signed or unsigned) exists. > > For the signness, one can just do: (T) -1 < 0 > > Then, to get the minimum value of a signed type, assuming >

Re: About issue 0001108 and abs(INT_MIN)

2018-07-23 Thread Vincent Lefevre
On 2018-07-23 08:06:46 +, Schwarz, Konrad wrote: > I don't think such code (to detect whether an arbitrary type is > signed or unsigned) exists. For the signness, one can just do: (T) -1 < 0 Then, to get the minimum value of a signed type, assuming two's complement and no padding bits: (2

RE: About issue 0001108 and abs(INT_MIN)

2018-07-23 Thread Schwarz, Konrad
> -Original Message- > From: Joerg Schilling [mailto:joerg.schill...@fokus.fraunhofer.de] > Sent: Thursday, July 19, 2018 4:53 PM > To: vincent-o...@vinc17.net; austin-group-l@opengroup.org > Subject: Re: About issue 0001108 and abs(INT_MIN) > > Vincent Lefevre wrote: > > > The