After upgrading from gcc 4.4.x to gcc 4.7.0, I started seeing:
error: initializer element not computable at load time
for the following snippet:
int prm_arr[] = {prm.field1, prm.field2, prm.field3};
This code worked fine with the gcc 4.4.x. I tried using -std=c99
option but it did not work. The following snippet might work
prm_arr[0] = prm.field1;
prm_arr[1] = prm.field2;
prm_arr[2] = prm.field3;
but, what is triggering this error?