[C-safe-secure-studygroup] On MISRA C:2012 Rule 12.4
Roberto Bagnara
bagnara at cs.unipr.it
Wed Jan 10 16:26:19 GMT 2018
MISRA C:2012 Rule 12.4:
Evaluation of constant expressions should not lead to unsigned integer
wrap-around
This is an advisory rule that is aimed at preventing (well defined)
wrap-around of unsigned constant integer expressions. The reason is
that it is unlikely the programmer did that intentionally: relying on
wrap-around at run-time is unfrequent but plausible; when this happens
at compile-time chances are this is a mistake.
Being advisory, in MISRA C:2012 this can be deviated without justification.
Said that, most MISRA projects that came under my attention did not deviate.
--
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/20180110/7bd72354/attachment.bin>
More information about the C-safe-secure-studygroup
mailing list