Mail Archives: djgpp/1997/01/06/06:37:20
On 5 Jan 1997, Roland Nilsson wrote:
> Oh. Now it works, thanks. Only problem is that the structure size
> still is expanded to a 4-byte boundary; The above structure would
> have foo::a at offset 0, foo::b at 1, but sizeof(foo) returns 8.
> But alright, this _is_ mentioned in the GCC manual. (Using the
> -fpack-struct argument yields sizeof(foo) = 5, however.)
That's because you can make an array of such structs, which still should
be aligned to avoid runtime penalties.
- Raw text -