controller icon indicating copy to clipboard operation
controller copied to clipboard

Accessing members of nested structs without identifying their parent name?

Open gigaj0ule opened this issue 6 years ago • 1 comments

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.

image

gigaj0ule avatar Oct 14 '18 06:10 gigaj0ule

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

haata avatar Oct 14 '18 17:10 haata