This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: RFC: attribute "unpadded"
- From: kenner at vlsi1 dot ultra dot nyu dot edu (Richard Kenner)
- To: zack at codesourcery dot com
- Cc: gcc at gcc dot gnu dot org
- Date: Fri, 23 Aug 02 19:07:09 EDT
- Subject: Re: RFC: attribute "unpadded"
I wonder if Ada can do something like this already, it seems to have
everything *else* in its type system...
Yes and no. Certainly you need to be able to have a record in Ada where
there is no padding, but the idea of its size not being a multiple of its
alignment is problematic. So what's actually done is that *two* sizes are
stored, the "GCC size", which includes the padding and is a multiple of the
alignment, and the "Ada size", which does not include the alignment. The
distinction is that it's the Ada size that represents the minimum size that
the record requires when placed into another packed record.
I was trying to decide if Mark's proposal would help Ada, but can't tell:
I'd need to see more details to know for sure.