A-25 Bitfields of greater than field size

Jim Dehnert dehnert at baalbek.engr.sgi.com
Sat Feb 5 00:56:51 UTC 2000


> I disagree.  If the user wants the bitfield to be aligned in a certain
> place, he has the tools to do so.  He can certainly pick a different
> size bitfield.  I think that this should be aligned as if it is the
> same size as the type, and then the extra bits put somewhere.  Putting
> them afterwards is probably simpler than before, or splitting it in
> the middle.

I see your point, but I draw the opposite conclusion.  If the user
wants a specific layout, he can use separate padding fields.  This
structure tells me that he wants a specific amount of space, total, and
doesn't care where the real data is.  I conclude that the compiler
should come as close to the requested space as is possible given the
natural alignment constraints.

(I must admit, though, that my other conclusion is that such a user
quite likely doesn't know what he's doing.  Does anyone know what the
rationale for this feature was?)

Jim

-	    Jim Dehnert		dehnert at sgi.com
				(650)933-4272




More information about the cxx-abi-dev mailing list