The following snippet of code gives an Error - C1830 Modifiable lvalue expected in function f2.
The code was tested with a new 'C' project for the MC9S08DZ60 processor.
Code:
struct s_profile { char a[4]; unsigned int u;};volatile struct s_profile profile;void f1(void) { profile.a[0] = 1; } const struct s_profile eep_profile[4]; void f2(void) { profile.a[0] = 2; }
The error is caused by the line const struct s_profile eep_profile[4].
Removing the const, or the array ref, and the error disappers.
David