I have code that is running differently between GCC and Atmel Studio:
uint32_t tc = 107900;
int8_t m = 59;
tc = tc - (m*1800);
On GCC, the result in tc
is 1700, as intended.
With AtmelStudio, the result in tc
is 132772, which is not correct.
The problem seems to be that the m*1800
term is being computed with the limited precision of m with AtmelStudio.
My question is, which compiler is doing it correctly?
Thank you.