------- Additional Comments From macro at linux-mips dot org 2005-06-07 12:14 ------- > That's not quite true, the type is not the same.
It's hard to argue for me as Ada is not a language I'm familiar with, but the problematic assignment is: return Ch.Attr; in Get_Character_Attribute() and both Ch.Attr and the return value of the function are declared as Character_Attribute_Set, so I guess they are both of the same type, aren't they. > How does that change the ABI for the containing record type? The type is laid > out only once. As for members, this is only done for non-aliased members so > ABI > considerations are irrelevant. Of course it changes the ABI -- if any member of a record (which is an equivalent to a C structure) gets its alignment increased, then the alignment of the containing record (structure) gets adjusted appropriately. Otherwise the member's record alignment requirement couldn't possibly be satisfied at the link time. And of course the alignment does matter for platforms that care about alignment as different machine code may be needed to access data. > > 2005-06-07 Maciej W. Rozycki <[EMAIL PROTECTED]> > > > > * ada/decl.c (make_packable_type): Use the same alignment for the > > new > > type. > > That would defeat the purpose of make_packable_type. If I understand code correctly compute_record_mode() should still be able to use one of the integer modes for platforms that don't care about alignment. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21937