Displaying 1 result from an estimated 1 matches for "081efcb9".
2017 May 18
2
Struct padding
Hi,
I am wondering how I can tell whether a field of a struct is introduced by
padding or not.
For example, if I have a struct:
struct foo1 {
char *p; /* 8 bytes */
char c; /* 1 byte
long x; /* 8 bytes */
};
clang may generate:
struct foo1 {
char *p; /* 8 bytes */
char c; /* 1 byte
char pad[7]; /* 7 bytes */
long x; /* 8 bytes */
};
Is