Please note: We are aware of an issue affecting replies on the Arm Community forums, which may not be loading as expected.
We apologize for any inconvenience and appreciate your patience while we investigate and work to resolve the issue.
Thank you for your understanding.
Hello,
On an ARM7, why isn't the value of 'my_char' truncated to the range of a signed char?
char my_char = 240;
I see that 'my_char' is stored in a register - fine, but why isn't that register ANDed with 127? The range of a char type on an ARM7 machine is -128..+127.
Thanks
Sorry - my mistake - a question of representation! I figured it out, thanks again.
It's a common situation that assigning a too large positive value to a signed value will end up being stored as a negative value.
The next issue is if the debugger will honor the "signed char" setting and present it as -16, or if it will present the value as 0xf0 or 240.