[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[avr-gcc-list] Type casting from 32 bit to 64 bit ... doesnt seem to wor
intiha Ho gai
[avr-gcc-list] Type casting from 32 bit to 64 bit ... doesnt seem to work
Fri, 10 Jun 2005 09:16:58 -0700
I dont know if this an avr-gcc issue, but it seems that if i am try to
typecast variables in an array of uint32_t to uint64_T as follows:
sumX += (uint64_t)array.x;
(where sumX is an uint64_t var, while array.x is uint32_t),
then this summation doesnt seem to work i.e. my summation values are
just totally incorrect.
however, when i change the type of array.x to be uint64_t and do no
typecasting (although the values of x are within the range of 32 bit)
the results are correct.
Any insight why this is so?
- [avr-gcc-list] Type casting from 32 bit to 64 bit ... doesnt seem to work,
intiha Ho gai <=