controller
controller copied to clipboard
Accessing members of nested structs without identifying their parent name?
I seem to have run into an odd issue where, best I can tell, the boot loader accesses members of nested structs without identifying their parent names. Is there a compiler flag I must set, or a special compiler I must use, to allow this?
It is not something I have seen in a C project before.
I believe this is a carry-over from the McHCK project (that's the basis of the bootloader). It only compiles with GCC I think. I tried a while ago to get clang working (works fine with the firmware), but I wasn't successful.
From the error it looks like the compiler isn't using anonymous structs correctly. I believe that's a c11 requirement. https://stackoverflow.com/a/25217654