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

From Tom Lane
Subject Re: Keep compiler silence (clang 10, implicit conversion from 'long' to 'double' )
Date
Msg-id 9262.1572966254@sss.pgh.pa.us
Whole thread Raw
In response to Re: Keep compiler silence (clang 10, implicit conversion from 'long'to 'double' )  (Yuya Watari <watari.yuya@gmail.com>)
Responses Re: Keep compiler silence (clang 10, implicit conversion from 'long'to 'double' )  (Yuya Watari <watari.yuya@gmail.com>)
List pgsql-hackers
Yuya Watari <watari.yuya@gmail.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



pgsql-hackers by date:

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