[C-safe-secure-studygroup] On MISRA C:2012 Rule 15.3

Roberto Bagnara bagnara at cs.unipr.it
Tue Apr 17 12:56:17 BST 2018


MISRA C:2012 Rule 15.3:
Any label referenced by a goto statement shall be declared in the same block, or in any block enclosing the goto statement.

This is a required rule that, for those programs that deviate advisory rule 15.1 (no gotos), prescribes to at least avoid jumps between blocks or into nested blocks.  Together with rule 15.2 (no backward gotos) this rule reduces the increase in complexity of the program control-flow graph that is inherent in the use of goto.

Unless a wholesale ban of gotos is preferred, this rule is one we definitely would like to have.


-- 
     Prof. Roberto Bagnara

Applied Formal Methods Laboratory - University of Parma, Italy
mailto:bagnara at cs.unipr.it
                              BUGSENG srl - http://bugseng.com
                              mailto:roberto.bagnara at bugseng.com


-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2093 bytes
Desc: S/MIME Cryptographic Signature
URL: <https://lists.trustable.io/pipermail/c-safe-secure-studygroup/attachments/20180417/106d77fa/attachment.bin>


More information about the C-safe-secure-studygroup mailing list