>> i am guessing that the requirement of being able to demote a type to
>> one of its anonymouse constituents -- as in Node to Lock in Ken's example --
>> would require a uniform layout that makes it easy to calculate the offset.
> 
> however this is the opposite case.  the padding is after the
> anon. structure.  the anon. structure itself is at offset 0.

but it doesn't have to be.  this is legit:

        typedef struct{
                Ehdr;           // 1
                Ehdr;           // 2
                uchar   op[2];
        }Pkt;

Reply via email to