AnsweredAssumed Answered

Bug in CW for Microcontrollers v6.2

Question asked by David Simpson on Jun 20, 2008
Latest reply on Jun 20, 2008 by CrasyCat
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.
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.