Tool/software: Code Composer Studio
If in an MSP430 C program I declare
unsigned long dummy = 200000;
the compiler handles the declaration properly and assigns dummy the value 200000.
But if I declare
unsigned long dummy = 100 * 2000;
the compiler assigns dummy the value 3392, which is 200000 - 3 * 2^16.
Shouldn't the compiler recognize that dummy has been declared unsigned long and compute the product to thirty-two bits?