HCS12 Compiler + No warning : C2705: Possible lost of data.

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

HCS12 Compiler + No warning : C2705: Possible lost of data.

ソリューションへジャンプ
2,023件の閲覧回数
ssinfod
Contributor IV

Hello,

 

I have the warning : "C2705: Possible loss of data" when I do the following :

 

unsigned int i1;

unsigned char c1;

c1 = 0;

i1 = 1;

c1 =  i1;

 

Anyhow, the compiler doesn't show any warning when I do :

 

unsigned int i1;

unsigned char c1;

c1 = 0;

i1 = 1;

 

c1 = i1 + 1;

 

Here is the question :

Why the compiler doesn't show a warning for the second example 

 

Is there a way to enable the warning for this type of statement ?

ラベル(1)
タグ(1)
0 件の賞賛
返信
1 解決策
917件の閲覧回数
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 返信
918件の閲覧回数
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 件の賞賛
返信