Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Clarified that the rule applies to pointers and referenced Appendix J.

Do not cast away a const qualification on a variable an object of pointer type. Casting away the const qualification allows a program to modify a constant valuethe object referred to by the pointer, which results may result in undefined behavior. See bullet 61 of Appendix J.

As an illustration, C99 provides a footnote:

...