This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: packed, aligned
- To: db at zigo dot dhs dot org, graham at gmurray dot org dot uk
- Subject: Re: packed, aligned
- From: Mike Stump <mrs at windriver dot com>
- Date: Tue, 13 Feb 2001 17:39:13 -0800 (PST)
- Cc: gcc at gcc dot gnu dot org
> To: Dennis Bjorklund <db@zigo.dhs.org>
> Cc: <gcc@gcc.gnu.org>
> From: Graham Murray <graham@gmurray.org.uk>
> Date: 11 Feb 2001 11:20:26 +0000
> Dennis Bjorklund <db@zigo.dhs.org> writes:
> > Why would someone want to pack a struct and still have some padding in the
> > end?
> So that in an array of structures, each structure starts on an
> appropriate boundary.
And byte aligned structures need only byte aligned boundaries, which
means zero padding. All structures can be changed to be byte aligned
by the addition of attributes.