Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Do not use the sizeof() operator
#7
It would seem that the real issue here is the poor definition of a byte in ISO C. A better proposal for a new rule would be "A byte shall always be regarded as 8 bits".

Because... making a byte 16 bits or 555 bits is like asking to have your product shot down in horrible ways over and over until everyone is fed up and it becomes obsolete.
I don't think it is motivated to change MISRA-C to support some weird >25 years old CPU core.
<t></t>
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)