Mail Archives: djgpp/1997/11/18/09:52:36
On Tue, 18 Nov 1997, Thomas Demmer wrote:
> > I saw that sizeof(DOUBLEST) is 12 instead of 10,
> > but I have no idea from were this comes from !!
>
> Just a wild guess: Memory alignment. Variables are
> aligned to a 4 Byte boundary, so if you use an extended in
> a struct, it eats 12 Bytes.
This guess is correct. GCC pads to a multiple of 4 bytes (otherwise
arrays of long double would suffer from unaligned accesses).
So the sizeof being 12 bytes is normal and is not necessarily connected
to the GDB problem.
- Raw text -