This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: RFC: attribute "unpadded"
>>>>> "Alexandre" == Alexandre Oliva <aoliva@redhat.com> writes:
Alexandre> Instead of attaching this attribute to the type, perhaps
Alexandre> it would bring us less complications to attach it to a
Alexandre> struct member, i.e., instead of:
>> struct A __attribute__((unpadded)) { void *vptr; char c; }; struct
>> B { struct A __base; char c2; };
Alexandre> you'd write:
>> struct A { void *vptr; char c; }; struct B { struct A __base
>> __attribute__((unpadded)); char c2; };
Alexandre> this wouldn't require any change in the typing rules,
Alexandre> since the type of struct A would be unchanged.
I like that. The "unpadded" proposal sounded like it would do
significant violence to the C type system, and this avoids that
issue.
paul