18-01-2021, 01:27 PM
Hello MISRA Bulletin Board,
I understand mixing signed and unsigned variables in arithmetic operations can really lead to unexpected results,
but I really fail to see what is the risk in adding a constant value of 2 (SLTR of signed char) to an unsigned 8-bit (char) variable.
Could you please elaborate what can possibly go wrong in this case?
Thanks in advance.
I understand mixing signed and unsigned variables in arithmetic operations can really lead to unexpected results,
but I really fail to see what is the risk in adding a constant value of 2 (SLTR of signed char) to an unsigned 8-bit (char) variable.
Could you please elaborate what can possibly go wrong in this case?
Thanks in advance.
<t></t>