4 ms·
> Section 5.4 talks about Unions. I was mistaken about the size of unions, which I thought always (or practically always) would be the size of the largest membe
by audidude 6y ago
> Section 5.4 talks about Unions. I was mistaken about the size of unions, which I thought always (or practically always) would be the size of the largest member,
The array'ability of the union is going to determine the size. So if you have a pointer at a given offset in one of the union'd structures it may need to increase the size of the union so that when used in an array the pointer will always stay aligned. (Same goes for any other type with alignment requirements).