Versions Compared

Key

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

...

If any of these are required, then an integer constant (an rvalue) must be used. For integer constants, it is preferable to use an enum instead of a const-qualified object as this eliminates the possibility of taking the address of the integer constant and does not required that storage is allocated for the value.

This recommendation is related to EXP10-A. Do not diminish the benefits of constants by assuming their values in expressions.

Non-Compliant Code (object-like macro)

...