Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
19.4 do while(0)
#2
Again I personally feel that MISRA-C: 1998 had this sorted with Rule 58.
I think good code and design does not need break statements (except in switch statements).

The goto statement has it's uses. Jumping out of nested block statements to error handling code in the case of an error is one such use.
It is better to create a deviation than to create convoluted code simply to comply with the MISRA rules.
<t></t>
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)