This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: RFC: attribute "unpadded"




--On Friday, August 23, 2002 7:42 PM -0400 Olivier Galibert <galibert@pobox.com> wrote:

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.

--
Mark Mitchell
CodeSourcery, LLC
mark@codesourcery.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]