10-11-2014, 08:27 AM
Ok, thank you very much for this answer.
I am agree with you : using a unsigned value in a signed integer type after integral promotion is not a problem.
But I had doubts after reading ISO C standard and, especially, after run our static analysis tool (that it throws a warning).
I think that :
Are you agree with that ?
I am agree with you : using a unsigned value in a signed integer type after integral promotion is not a problem.
But I had doubts after reading ISO C standard and, especially, after run our static analysis tool (that it throws a warning).
I think that :
- ISO C standard is not enough precise (bitwise operators have "implementation-defined behavior" on signed integers values and not on signed integers type
- Static analysis tool throws a false positive warning (it known that the value is necessarily unsigned) because the essentially type is explicit (an unsigned integer).
Are you agree with that ?
<t></t>