Versions Compared

Key

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

...

Wiki Markup
This is recommended because the C99 standard requires only the digit characters ('0' - '9') to have consecutive numerical values \[[C99 |http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1124.pdf]N1401\]. Thus, operations that rely on expected values for plain character or plain wide character-typed expressions can lead to unexpected behavior.

...

Wiki Markup
This rule appears in the C++ Secure Coding Standard as \[[cplusplus:STR07-CPP. Don't assume numeric values for expressions with type plain character]\].

References

Wiki Markup
\[[C99|http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1124.pdf]C99 N1401\] Section 5.2.1 "Character sets"