This is the mail archive of the
mailing list for the GCC project.
Re: RFC: attribute "unpadded"
- From: Mark Mitchell <mark at codesourcery dot com>
- To: Olivier Galibert <galibert at pobox dot com>,Andrew Haley <aph at cambridge dot redhat dot com>
- Cc: "gcc at gcc dot gnu dot org" <gcc at gcc dot gnu dot org>
- Date: Mon, 26 Aug 2002 01:14:21 -0000
- Subject: Re: RFC: attribute "unpadded"
--On Friday, August 23, 2002 7:42 PM -0400 Olivier Galibert
On Fri, Aug 23, 2002 at 06:49:17PM +0100, Andrew Haley wrote:
Documenting the semantics of (attribute "unpadded") and (attribute
"aligned") and (attribute "packed") and the way that they interact in
a way that is comprehensible to a programmer will present some poor
soul with quite a challenge.
Maybe you want to define that in terms of internal alignment (within
the structure) and external alignment (when you put these structures
next to each other, i.e. sizeof() in practice).
It's not an alignment question; it's a size question. The alignment of
an "unpadded" struct is the same as the padded version.