Is the compiler allowed to clobber struct padding?

Yes it is allowed and in fact is already done for example for storing type safety information. If you want to reserve space within struct padding, simply declare the data as a field along with the others.

4 Likes