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

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Yuya Watari <watari(dot)yuya(at)gmail(dot)com>
Cc: Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Keep compiler silence (clang 10, implicit conversion from 'long' to 'double' )
Date: 2019-11-05 15:04:14
Message-ID: 9262.1572966254@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Yuya Watari <watari(dot)yuya(at)gmail(dot)com> writes:
> The added macro FLOAT8_FITS_IN_INT32() does not check NaN explicitly,
> but it sufficiently handles the case.

Really? I don't think anything is guaranteed about how a NaN will
compare when using C's non-NaN-aware comparison operators.

My thought about this was to annotate the macros with a reminder
to also check for NaN if there's any possibility that the value
is NaN.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2019-11-05 15:07:39 Re: v12 and pg_restore -f-
Previous Message Alvaro Herrera 2019-11-05 15:02:31 Re: let's make the list of reportable GUCs configurable (was Re: Add %r substitution for psql prompts to show recovery status)