5.3.5.3 Anonymous Structures And Unions
The MPLAB XC8 compiler supports anonymous structures and unions. These are C11 constructs with no identifier and whose members can be accessed without referencing the identifier of the construct. Anonymous structures and unions must be placed inside other structures or unions. For example:
struct {
union {
int x;
double y;
};
} aaa;
aaa.x = 99;
Here, the union
is not named and its members are accessed
as if they are part of the structure.
Objects defined with anonymous structures or unions can only be initialized if you are using the C99 Standard.