If I have some simple code involving pointer differences, like the following, -
void main()
{
int datum;
int *ptr = &datum;
int *ptr1;
int diff;
ptr1 = ptr + 1;
diff = ptr1 - ptr;
}
after execution of the last line the CCS debugger will show that diff = 1,
but will erroneously evaluate the expression "ptr1 - ptr" as 4. I conclude that the debugger does not do pointer subtraction correctly though the compiler does.I am using CCS 5 but I think it has always been this way.