>Peter Memishian <[EMAIL PROTECTED]> wrote:
>
>>
>> > Correct. But it seems to be a gcc bug. The C-standard allows padding at
>> > the end of a structure but from my understanding, a structure like
>>
>> I could be misremembering, but I thought the Solaris ABI prohibits such
>> padding (not that it does you any good ;-)
>
>I don't see any benefit from this kind of padding either.
Padding at the end of a structure is often required by the ABI.
Take, e.g., a structure like this:
struct weird {
int x;
char c;
};
the ABI requires that "x" is aligned on a 4 byte boundary and that
means that sizeof(struct weird) is required to be a multiple of 4.
That's the only way to make arrays "struct weird bits[10];"
work correctly.
Casper
_______________________________________________
opensolaris-code mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/opensolaris-code