Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

This rule appears in the C++ Secure Coding Standard as FLP30-CPP. Do not use floating point variables as loop counters.

This rule appears in the Java Secure Coding Standard as FLP31-J. Do not use floating point variables as loop counters.

References

Wiki Markup
\[[ISO/IEC 14882:2003|AA. C References#ISO/IEC 14882-2003]\] Sections 2.13.3, "Floating literals," and 3.9.1, "Fundamental types"
\[[ISO/IEC PDTR 24772|AA. C References#ISO/IEC PDTR 24772]\] "PLF Floating Point Arithmetic"
\[[Lockheed Martin 05|AA. C References#Lockheed Martin 05]\] AV Rule 197, "Floating point variables shall not be used as loop counters"
\[[MISRA 04|AA. C References#MISRA 04]\] Rules 13.3 and 13.4

...