|GCC Struct layout firstname.lastname@example.org (Randall Hyde) (2002-04-19)|
|Re: GCC Struct layout email@example.com (2002-04-19)|
|Re: GCC Struct layout firstname.lastname@example.org (Jim Wilson) (2002-04-19)|
|From:||email@example.com (Martin v. =?iso-8859-1?q?L=F6wis?=)|
|Date:||19 Apr 2002 22:54:14 -0400|
|Organization:||Humboldt University Berlin, Department of Computer Science|
|Keywords:||C, GCC, architecture|
|Posted-Date:||19 Apr 2002 22:54:14 EDT|
"Randall Hyde" <firstname.lastname@example.org> writes:
> I need a pointer to some documentation that *fully* describes how GCC
> lays out fields in structs (alignment, padding, etc.).
There is no such documentation.
> I am quite aware of the alignment attribute, I'm mainly worried
> about the default alignment of struct fields (no alignment
> explicitly specified).
That depends on the target (as John points out). Even for x86,
different targets may use different strategies. On most targets, gcc
implements the vendor's ABI. Therefore, you need to read the ABI of
the vendor. For SysV, that means you need to read both the gABI, and
the 386 psABI.
Return to the
Search the comp.compilers archives again.