Bug in CW for Microcontrollers v6.2

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

Bug in CW for Microcontrollers v6.2

跳至解决方案
1,537 次查看
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
标签 (1)
标记 (1)
0 项奖励
回复
1 解答
584 次查看
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 项奖励
回复
1 回复
585 次查看
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 项奖励
回复