This is the mail archive of the
mailing list for the GCC project.
Re: RFC: attribute "unpadded"
Mark Mitchell writes:
> --On Friday, August 23, 2002 6:49 PM +0100 Andrew Haley
> <email@example.com> 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.
> That would be me, I expect.
> Your underlying point (that this is all very complex) is correct.
It's not just that.
Types with this new attribute will have unusual semantics - you can't
have arrays of them nor take the addresses of objects with that type,
for example. Also, "unpadded" will interact with other attributes in
interesting and possibly strange ways. So, you're adding more
complexity to an edifice that is already rather baroque -- and the end
result of the combination of these attributes will be difficult to
explain and understand.