Versions Compared

Key

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

...

In this noncompliant code example, the caller calls foo with a parameter of 3. Because foo() is declared without the void parameter, the compiler will not perform any caller check. Due to the accidental internal implementation, the function foo() outputs the value 3, which matches as the caller 's expectationexpects. In an inherited code base where foo and the caller are developed at different times, the caller will expect foo() to accept one integer as a parameter and to output the corresponding message when the parameter is changed.

...