Mail Archives: djgpp/1998/04/21/09:32:27
Hi all.
My problem is that when I declare a struct like:
struct a {
char b[n];
int c;
.
.
. }
if n (number of char in array) is not a multiple of 4
the array is enlarged to fit a 4' multiple,
n=32 int c is 32 byte from start of struct
n=33 int c is 36 byte from start of struct
I've verified it with GDB and doing sizeof(struct a).
Does anyone know how to make the struct, and the array, of
the proper size ,apart from doing the struct as an array ?
Is it a bug of compiler ?
Thanks.
ps. Please answer by newsgroup .
- Raw text -