Andreas Schwab <sch...@linux-m68k.org> writes:
> Johannes Sixt <j...@kdbg.org> writes:
>> Isn't internal padding only allowed between members to achieve correct
>> alignment of later members, and at the end only sufficient padding so
>> that members are aligned correctly when the struct is part of an array?
> The standard allows arbitrary internal padding, it doesn't have to be
What the standard does guarantee is that a pointer to a struct can be
cast to a pointer to its first member and vice versa. It does not as
far as I can see guarantee that a pointer to something of the same type
of its first member can be converted to a pointer to a struct even if
the struct only contains a member of such type.
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html