Versions Compared

Key

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

...

In this example, void is explicitly specified as a parameter. If the caller calls foo(3) again, a warning message will be issued as follows:

Code Block
bgColor#FFCCCC

error: too many arguments to function ‘foo’

Because it is an error message, the programmer can not ignore it and thus previous belief regarding the interface can be rectified.

Noncompliant Code Example (information outflow)

...