Versions Compared

Key

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

...

In this particular example, caller gives a call to foo with parameter specified as 3. When compiled with gcc4gcc-4.3.3 in Linux, no warning will be issued. Due to the accidental internal implementation, the function foo() outputs i value: 3 which matches with caller's temptation. In an inherited code base where foo and caller are developed at different time, this leads to caller's belief that foo actually accept one integer as parameter and foo will output the corresponding message when parameter is changed.

...