This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

C2000 Compiler (6.1.4) doesn't generate loss of data warning

Guru 20075 points

Hello,

The compiler doesn't generate a warning for the following code. I would expect the compiler to generate a loss of data warning for the line b=a.

I am using C2000 compiler version 6.1.4.

Stephen

int main(void)

{    

   unsigned long int a = 1;

   char b =2;

   b = a;

   return 0;

}