Re: [PATCH 1/2] Avoid implicit floating point conversions [v2]

Thomas Wucher <[email protected]>
Newsgroups gmane.comp.lib.newlib
Message-ID <[email protected]>
On 24.08.20 08:33, Keith Packard via Newlib wrote:
> Corinna Vinschen via Newlib <[email protected]> writes:
>
> > Not taking implicit compiler optimisations into account, wouldn't it
> > make more sense to avoid the conversion altogether, using
> > __builtin_inf() in these places?
>
> Yeah, could do that instead. I think it's mostly a matter of what looks
> better -- using the "standard" value of INFINITY and casting or using a
> compiler internal value without. I think it'll confuse an equal number
> of people either way.
>
> Any preferences?

We would prefer the use of the standard C/Posix macros. This way the exact
inf/nan return value can be controlled at a central point in the library
and does not depend on a specific compiler implementation of the
builtins.

This ensures reproducible results across different compilers.

>
> --
> -keith

Regards
Thomas
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.