Re: Keep compiler silence (clang 10, implicit conversion from 'long'to 'double' ) - Mailing list pgsql-hackers

From Yuya Watari
Subject Re: Keep compiler silence (clang 10, implicit conversion from 'long'to 'double' )
Date
Msg-id CAJ2pMkav8eUrXD4TyuHzmGpbew7OkWnmxEzyE-wiuWHdTSQoPQ@mail.gmail.com
Whole thread Raw
In response to Re: Keep compiler silence (clang 10, implicit conversion from'long' to 'double' )  (Kyotaro Horiguchi <horikyota.ntt@gmail.com>)
Responses Re: Keep compiler silence (clang 10, implicit conversion from 'long' to 'double' )
List pgsql-hackers
Hello Horiguchi-san,

On Thu, Nov 7, 2019 at 3:10 PM Kyotaro Horiguchi
<horikyota.ntt@gmail.com> wrote:
> Mmm? See the bit in the patch cited below (v5).
>
> +       /* Range check */
> +       if (unlikely(!FLOAT8_FITS_IN_INT32(num)) || isnan(num))
>
> If compiler doesn't any fancy, num is fed to an arithmetic before
> checking if it is NaN. That seems have a chance of exception.

Thank you for pointing it out. That's my mistake. I fixed it and
attached the patch.

Best regards,
Yuya Watari
NTT Software Innovation Center
watari.yuya@gmail.com

Attachment

pgsql-hackers by date:

Previous
From: Etsuro Fujita
Date:
Subject: Re: [PATCH][DOC] Fix for PREPARE TRANSACTION doc and postgres_fdw message.
Next
From: Kyotaro Horiguchi
Date:
Subject: Re: [PATCH][DOC] Fix for PREPARE TRANSACTION doc and postgres_fdwmessage.