If I define a C struct as,
typedef struct { double data[2]; } my_struct;
Is there any possibility that padding would be added to such a structure? Or can I safely assume that sizeof(my_struct) is always 2*sizeof(double) on all systems?
https://stackoverflow.com/questions/65802477/is-padding-ever-added-to-this-c-structure January 20, 2021 at 11:00AM
没有评论:
发表评论