|GCC Struct layout email@example.com (Randall Hyde) (2002-04-19)|
|Re: GCC Struct layout firstname.lastname@example.org (2002-04-19)|
|Re: GCC Struct layout email@example.com (Jim Wilson) (2002-04-19)|
|From:||firstname.lastname@example.org (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" <email@example.com> 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.