Re: Decimal to floating point and floating point to decimal conversion

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 7/11/23 13:33, henri.cloetens@xxxxxxxxxx wrote:
> Can you please explain your point of view ?.

It's not Jonathan's point of view, it's the standard.

https://blog.llvm.org/2011/05/what-every-c-programmer-should-know.html

  Violating Type Rules: It is undefined behavior to cast an int* to a
  float* and dereference it (accessing the "int" as if it were a
  "float"). C requires that these sorts of type conversions happen
  through memcpy: using pointer casts is not correct and undefined
  behavior results. The rules for this are quite nuanced and I don't
  want to go into the details here...

--
Andrew Haley  (he/him)
Java Platform Lead Engineer
Red Hat UK Ltd. <https://www.redhat.com>
https://keybase.io/andrewhaley
EAC8 43EB D3EF DB98 CC77 2FAD A5CD 6035 332F A671





[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux