Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
10.1 the calculation "50 << 3U" looks safe to me
#2
as I read the MISRA PDF, the motivation that this is not compliant is that the result is "implementation defined".

According to the C99 standard.. In a bitshift; if the result can be represented in the result type then it is well-defined behaviour. If the result can't be represented in the result type then it is undefined behaviour. I see nothing about "implementation defined" behaviour.
<t></t>


Messages In This Thread

Forum Jump:


Users browsing this thread: 6 Guest(s)