Versions Compared

Key

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

Wiki Markup
Do
not attempt to modify a variable, array, or pointer declared as const. The specification of const in variables and parameters implies to a maintainer or caller that, despite knowing some memory location, the code will not modify its content. Although C allows you to remove the specifier using typecasts, doing so violates the implication of the specifier
 not cast away a const qualification on a variable type.  Casting away the const qualification will allow violation of rule \[[EXP31-C|EXP31-C. Do not modify constant values ]\] prohibiting the modification of constant values.

Non-Compliant Code Example

...