Hmm! you are right and I wonder WTH I was thinking of, albeit alignment and indirection can be eliminated by unionizing an 8 byte char array and a double.
Type: Posts; User: itCbitC
Hmm! you are right and I wonder WTH I was thinking of, albeit alignment and indirection can be eliminated by unionizing an 8 byte char array and a double.
Good point!
@OP:
Based on Salem's comment, explicitly specify a #pragma pack(8) directive to ensure proper alignment.
Yep, just point a double* to the base of the 8 byte char array and dereference it.