In the Linux kernel, I see a declaration of an array of structs that looks like this
struct SomeStructName [] ={
[SOMEWEIRD_NAME] = {
.field1 = "some value"
},
[SOMEWEIRD_NAME2] = {
.field1 = "some value1"
},
}
I have never seen a declaration like that, specifically I can't figure out what [SOMEWEIRD_NAME] means, and why it's used.
.fieldsyntax. It seems I was wrong, though GCC does have some extra syntax not in the standard.[0..255]) is a GNU extension