The scope is in x86
For example, we have a struct like this:
struct X{
int a;
char b;
// compiler will pad 3 bytes here
double c;
};
X x;
I think the alignment of x
should be the largest member in it, in this case is double, which is 8 bytes,
so &x
should be a multiple of 8, am I right?
However, after some tests, my compiler(msvc 2013) says &x
can also be a multiple of 4 but not 8.
Isn't it meaning &x.c
will also be a multiple of 4?
Where do I misunderstand?