Bug in CW for Microcontrollers v6.2

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Bug in CW for Microcontrollers v6.2

ソリューションへジャンプ
1,536件の閲覧回数
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 解決策
583件の閲覧回数
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 返信
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 件の賞賛
返信