Versions Compared

Key

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

The definitions of two constant expressions should be related when, and only when , the values they express are also related.

...

In this noncompliant code example, OUT_STR_LEN must always be exactly two 2 greater than IN_STR_LEN. These definitions fail to reflect this requirement:

...

C Secure Coding Standard: "DCL08-C. Properly encode relationships in constant definitions"

C++ Secure Coding Standard: "DCL08-CPP. Properly encode relationships in constant definitions"

Bibliography

Wiki Markup
\[[JLS 2005|AA. References#JLS 05]\] [§4.12.4, "{{final}} Variables"|http://java.sun.com/docs/books/jls/third_edition/html/typesValues.html#4.12.4]

...