>>103160446
Yeah, so about that ...
typedef struct
{
const unsigned a;
const unsigned b;
}immutable;
typedef struct
{
int done;
}mutable;
typedef struct
{
const immutable immu;
mutable mu;
}my_struct;
static my_struct array[] =
{
{{1,2},{0}},
{{3,4},{0}},
{{5,6},{0}},
{{7,8},{0}}
};
unsigned long long foo(void)
{
unsigned long long ret = 0;
for(unsigned i = 0;i < ARRAY_SIZE(array);i++)
ret += array[i].immu.a * 2 + array[i].immu.b;
return ret;
}
void bar(void)
{
for(unsigned i = 0;i < ARRAY_SIZE(array);i++)
array[i].mu.done = 1;
}
>tl; dr: you're a mouthbreathing retard who deserves to be murdered