Allocating memory for unions and difference between union pointer and union of pointers
问题 Since my question here couldn't be confidently answered, I ask here again in hope that someone knows for sure: Is there any difference (besides syntactical) between a pointer to a union and a union that contains pointers to its elements? The generated assembly in this example is identical. As long as I'm never accessing the other members, is it allowed to allocate memory for only one of the members (which isn't the largest)? Regarding the 2nd question, 6.5.2.1 of the C89 draft says: The size