3 ms·
What does endianness have to do with it?
by duaneb 12y ago
What does endianness have to do with it?
- JoeAltmaier 12y agoCasting smaller doesn't hurt if the numbers are small and you're little endian - because the ptr will still point at the meat of the scalar (instead of the high bytes with zeros in them as it would if big-endian)
- duaneb 12y agoI'm not sure you understand big-endian casting—it's still value based, so you'll still get the least significant bits in the casted value.
- JoeAltmaier 12y agoThe issue was, casting an untyped pointer which does NOT get the conversion you mention.