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

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

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

Jump to solution
1,453 Views
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 ?

Labels (1)
Tags (1)
0 Kudos
1 Solution
347 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
348 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