Re:PLOS2021: ISO-C became unusable for operating systems
by jjtheblunt on Thursday October 07, 2021 @03:18AM
(#28783227)
In C you're free to get the address of the float (presuming it's not in a register) and cast that address to a pointer to an array of char, which doesn't copy anything, just re-decrees, from that point on, to the code generator of the compiler what assembly code is generated.
[ Parent
| on HN ]
Re:PLOS2021: ISO-C became unusable for operating systems
by ncmncm on Thursday October 07, 2021 @05:09PM
(#28792130)
Right, I should not have said you have to memcpy. You can poke bytes any way you like, in any order you like. But! memcpy is known to compiler optimizers, so is more reliably optimized away.