Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Rule 10.1 Small integer type operands of bitwise operators
#3
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 :
  • 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>


Messages In This Thread

Forum Jump:


Users browsing this thread: 2 Guest(s)