...
Automated detection of uses of the %
operator is straightforward. Sound determination of whether those uses correctly reflect the intent of the programmer is infeasible in the general case. Heuristic warnings could be useful.
Related Guidelines
C Secure Coding Standard |
...
"INT10-C. Do not assume a positive remainder when using the % operator" | |
C++ Secure Coding Standard |
...
Bibliography
<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="6f47c9ce9f881a2e-4a4e9d96-42bd4d64-a0b69840-9a16d558b341659b5b29291c"><ac:plain-text-body><![CDATA[ | [[JLS 2005 | AA. Bibliography#JLS 05]] | [§15.17.3, "Remainder Operators" | http://java.sun.com/docs/books/jls/third_edition/html/expressions.html#15.17.3] | ]]></ac:plain-text-body></ac:structured-macro> |
...