Bug in CW for Microcontrollers v6.2

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Bug in CW for Microcontrollers v6.2

Jump to solution
1,367 Views
djsimpson
Contributor III
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
Labels (1)
Tags (1)
0 Kudos
1 Solution
414 Views
CrasyCat
Specialist III
Hello
 
I would recommend you to submit a service request for that.

Click here to submit a service request.

Make sure to attach a reproducible project and installed product information to the service request.
To generate the required information:
- Start CodeWarrior
- Open the project
- Select "Help" -> "Pack and Go" and follow instructions on the screen.

Attach the generated .zip file to the SR.
 
CrasyCat

View solution in original post

0 Kudos
1 Reply
415 Views
CrasyCat
Specialist III
Hello
 
I would recommend you to submit a service request for that.

Click here to submit a service request.

Make sure to attach a reproducible project and installed product information to the service request.
To generate the required information:
- Start CodeWarrior
- Open the project
- Select "Help" -> "Pack and Go" and follow instructions on the screen.

Attach the generated .zip file to the SR.
 
CrasyCat
0 Kudos