Is it safe to do something like
When I refer to the val2 field in the union, I only care about accessing a and b. Do I need to add the padding to val2?Code:typedef union
{
struct
{
int a;
int b;
int c;
int d;
} val1;
struct
{
int e;
int f;
} val2;
}my_u;