Re: Keep compiler silence (clang 10, implicit conversion from 'long' to 'double' )

From: Yuya Watari <watari(dot)yuya(at)gmail(dot)com>
To: 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>, Kyotaro Horiguchi <horikyota(dot)ntt(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-06 04:56:46
Message-ID: CAJ2pMkY-dGz0Bc7xFaXqk7hk30KzrP6msZfHAHpJ-SnE_ZLD3w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hello Tom, Thomas, and Andrew,

> Tom> That commit presumes that floats follow the IEEE bitwise
> Tom> representation, I think;
>
> Correct. (It notably does _not_ make any assumptions about how floating
> point arithmetic or comparisons work - all the computation is done in
> integers.)
>
> Tom> but it's a long way from there to assuming that float comparisons
> Tom> do something that is explicitly *not* promised by C99.
>
> I agree.

Thank you for your comments. I agree that we should not assume
anything that is not guaranteed in the language specification. The
modified patch (attached in the previous e-mail) checks NaN explicitly
if needed.

Best regards,
Yuya Watari
NTT Software Innovation Center
watari(dot)yuya(at)gmail(dot)com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Fabien COELHO 2019-11-06 05:48:14 Re: pgbench - refactor init functions with buffers
Previous Message Michael Paquier 2019-11-06 04:43:14 Re: Include RELKIND_TOASTVALUE in get_relkind_objtype