I assume something like this is legal (where foo is a pointer to void):
struct on_off { unsigned light : 1; unsigned toaster : 1; int count; unsigned ac : 4; unsigned : 4; unsigned clock : 1; unsigned : 0; unsigned flag : 1; }; ((on_off) foo).count = 3;
But I'm wondering if the structure is structured, whether something like this is legal:
((struct { unsigned light : 1; unsigned toaster : 1; int count; unsigned ac : 4; unsigned : 4; unsigned clock : 1; unsigned : 0; unsigned flag : 1; }) foo).count = 3;
... or something like that.
Thanks!
source share