Our customer would like to know about an address boundary of a structure as shown below.
(1) When declaring a structure variable all of sampleA to sampleF,
what is the address boundary where the entity of the structure is located?
In addition, does a padding occur at the declaration?
2) When declaring a pointer and securing the area of the structure,
what is the address boundary where the entity of the structure is located?
struct sampleA {
long a;
long b;
};
struct sampleB {
short a;
short b;
long c;
long d;
};
struct sampleC {
union {
short a[8];
long b[4];
} c;
};
struct sampleD {
short a:8;
short b:8;
short c;
long d;
};
struct sampleE {
short b;
short c;
struct sampleD a;
long d;
};
struct sampleF {
struct sampleD *pa;
short b;
short c;
long d;
};
Regards,