From: | Yuya Watari <watari(dot)yuya(at)gmail(dot)com> |
---|---|
To: | Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com>, Andrew Gierth <andrew(at)tao11(dot)riddles(dot)org(dot)uk>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Thomas Munro <thomas(dot)munro(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Keep compiler silence (clang 10, implicit conversion from 'long' to 'double' ) |
Date: | 2019-11-07 08:21:06 |
Message-ID: | CAJ2pMkav8eUrXD4TyuHzmGpbew7OkWnmxEzyE-wiuWHdTSQoPQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hello Horiguchi-san,
On Thu, Nov 7, 2019 at 3:10 PM Kyotaro Horiguchi
<horikyota(dot)ntt(at)gmail(dot)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(dot)yuya(at)gmail(dot)com
Attachment | Content-Type | Size |
---|---|---|
v6-keep-compiler-silence.patch | application/octet-stream | 7.7 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Kyotaro Horiguchi | 2019-11-07 08:22:18 | Re: [PATCH][DOC] Fix for PREPARE TRANSACTION doc and postgres_fdw message. |
Previous Message | Etsuro Fujita | 2019-11-07 08:20:07 | Re: [PATCH][DOC] Fix for PREPARE TRANSACTION doc and postgres_fdw message. |