|
From: | Riccardo Mottola |
Subject: | Re: scary warning about casts |
Date: | Fri, 3 Dec 2021 02:07:24 +0100 |
User-agent: | Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:68.0) Gecko/20100101 SeaMonkey/2.53.10 |
Hi, Gregory Casamento wrote:
Given that the cast is implicit this is left up to the compiler to determine. Luckily GCC and clang (our only supported compilers) do this in the way we expect. I suggest that we do a little better and do the conversion in a more predictable way so that we don't depend on undefined and/or compiler-specific behavior. GC
I did some analysis, I think an explicit cast to float is enough. I committed that
Riccardo
[Prev in Thread] | Current Thread | [Next in Thread] |